Skip to content

video is black, sound is playing #62

@gossi

Description

@gossi

I made the switch from desktop to mobile development, using cordova.

Cordova and mobile platforms are kinda weird when it comes to path and URLs for files. Cordova mainly offers two urls: file:// and cdvfile:// to access videos on the mobile device. The apps itself are served via file://android_asset/www/index.html (as prod build) or via http:// (dev build). Also there are many restrictions that need to be adjusted to load locally available videos (CORS and mobile device access whitelisting). Using a standard <video> element with one of the urls above as element.src works quite nice. Setting the crossorigin attribute to anonymous can make the video unloadable (which is a must to display it onto canvas). I was able to load a video in a prod build (served as file://) from file:// with anonymous crossorigin. At least I could instruct the VideoContext to play, however the screen was black, yet the audio gives sound.

From MDN video element reference:

crossorigin This enumerated attribute indicates whether to use CORS to fetch the related image. CORS-enabled resources can be reused in the element without being tainted

Since I set CORS to whitelist my video origin, which finally made the VideoContext play but only sound, I'm wondering whether you experienced this field before and if you have a good advise to make this library usable on mobile devices (using cordova).

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions