Skip to content
This repository was archived by the owner on Nov 20, 2021. It is now read-only.
This repository was archived by the owner on Nov 20, 2021. It is now read-only.

Autoplay attribute breaks functionality (Angular, Meteor) #101

Open
@manuelnaturalcycles

Description

@manuelnaturalcycles

Hello, I love this polyfill, we will use it in production! So many thanks for the work put on this.

The only problem that I have is this:

<video class="introPage-backVideo introPage-fadeable" ng-class="{'introPage-fadedOut': vm.playingOnboarding}" src="videos/loop.mp4" autoplay muted loop playsinline></video>

$backVideo = $('.introPage-backVideo')
backVideoDOMElement = $backVideo.get(0) as HTMLMediaElement
window.makeVideoPlayableInline(backVideoDOMElement, false)

in this case the video still goes automatically to full-screen typical native video behavior in ios8 and 9

if i remove the autoplay and instead use:

$backVideo = $('.introPage-backVideo')
backVideoDOMElement = $backVideo.get(0) as HTMLMediaElement
window.makeVideoPlayableInline(backVideoDOMElement, false)
backVideoDOMElement.play()

it works like a charm.

so somehow 'autoplay' as html attribute has to be replaced by '.play()' on dom element.

Any clues?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions