RUN(internals.setMediaElementRestrictions(video, "RequirePageVisibilityToPlayAudio")) | |
RUN(video.src = findMediaFile("video", "content/test")) | |
EVENT(canplaythrough) | |
RUN(internals.setPageVisibility(false)) | |
RUN(promise = video.play()) | |
Promise rejected correctly OK | |
RUN(internals.setPageVisibility(true)) | |
RUN(promise = video.play()) | |
Promise resolved OK | |
RUN(internals.setPageVisibility(false)) | |
EVENT(pause) | |
END OF TEST | |