Skip to content

Plugin is not importable #83

@qubis741

Description

@qubis741

Description

I am trying to use your plugin, via import statements. Problem is, that I can't get it working. I am getting error

Steps to reproduce

I have imported videojs and overlay plugin and try to register it, because when I didn't, I got error about function overlay to be undefined. Then I got error mentioned below

import videojs from 'video.js'
import overlay from 'videojs-overlay'
....
videojs.registerPlugin('overlay', overlay) // error
....
player.overlay({...})

Results

Expected

Expected to be working

Actual

Got error

Error output

VIDEOJS: ERROR: Error: Component Overlay does not exist
at Player.addChild (video.cjs.js:3361)
at videojs-overlay.es.js:371
at Array.map ()
at Player.plugin (videojs-overlay.es.js:347)
at Player.basicPluginWrapper [as overlay] (video.cjs.js:23094)
at videoTracking (application.js:130)
at Player. (application.js:92)
at HTMLDivElement.bound (video.cjs.js:2070)
at HTMLDivElement.data.dispatcher (video.cjs.js:1717)
at trigger (video.cjs.js:1849)

Additional Information

Please include any additional information necessary here. Including the following:

versions

videojs

"video.js": "^7.0.3",
"videojs-overlay": "^2.1.4"

browsers

Version 69.0.3497.100 (Official Build) (64-bit)

OSes

macOS High Sierra 10.13.6

plugins

"@dlive/videojs-resolution-switcher": "^0.6.0"

If I am doing something wrong, please help me and include it also in docs, because I haven't found any documentation about how to use your plugin with imports. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions