Skip to content

throws errors on pages with no video tags #1

@abritinthebay

Description

@abritinthebay

This is a problem if you're building a library which may or may not have video on page load. For example in any modern javascript application.

Simple fix - in videosub_main add this as the second line:

if(!myVideo) {
return;
}

and then add below the domReady call:

$VIDEOSUB.fn.videosub = videosub_main;

So the code is callable when needed. In fact I'd suggest removing the dom call entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions