Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dual dummy video support (WebM + MP4) #58

Merged
merged 6 commits into from
Dec 4, 2018
Merged

Conversation

richtr
Copy link
Owner

@richtr richtr commented Dec 4, 2018

Prevents audio interruption on both Android and iOS web browsers while also supporting a wider range of browsers (i.e. Chromium on Android that does not play MP4 files).

Based on the idea presented here: #55 (comment)

Maybe NoSleep could provide the source file in both MP4 and WebM and let the browser play the best fitted one?

I think this is a good idea. Provide two video sources and let the browser pick one. Regarding #47 I think the WebM video should not include an audio track.

Consists of:

richtr and others added 3 commits December 4, 2018 08:12
By providing two sources the browser can choose the file that is most
appropriate for playing the wake lock video.

The WebM video, while containing no sound, still captures the screen
lock on Android devices.
At least on iOS this works and has the benefit the user's
music doesn't stop playing yet it still doesn't sleep
@richtr richtr merged commit 69edd9c into master Dec 4, 2018
@richtr richtr deleted the feature/webm-mp4-dual-video branch December 4, 2018 08:21
@richtr richtr mentioned this pull request Dec 4, 2018
alireza-roshanasan added a commit to alireza-roshanasan/NoSleep.js that referenced this pull request Jul 18, 2020
@MasterInQuestion
Copy link

MasterInQuestion commented Apr 16, 2023

    [ Quote richtr @ CE 2018-12-04 08:01:22 UTC:
https://github.com/richtr/NoSleep.js/pull/58#issue-387151394
    Chromium on Android that does not play MP4 files ]
<^>    MP4 is merely container format.
    What it may not play is probably the H.264 video stream. ~~(try MPEG-2 TS?)~~
    (try this [ https://github.com/richtr/NoSleep.js/issues/157#issuecomment-1512895724 ])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants