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

Playlist method video sequence on mobile device #467

Open
diegomontanaduarte opened this issue Sep 3, 2020 · 0 comments
Open

Playlist method video sequence on mobile device #467

diegomontanaduarte opened this issue Sep 3, 2020 · 0 comments

Comments

@diegomontanaduarte
Copy link

diegomontanaduarte commented Sep 3, 2020

I have implemented the following playlist code. Works great on desktop device, it plays the videos in sequence but using a mobile device the videos sequence is random and sometimes it play the same video twice.

shuffle and loop parameters are configured to false. Am I missing something?

<script>
        var myPlayListPlayer;
        jQuery(function () {
            /**
             * Set the video list with all the parameters for each video
             * @type {*[]}
             */
            var videos = [
                {
                    videoURL: "MASKED",
                    containment: 'body',
                    autoPlay: true,
                    mute: true,
                    useOnMobile: true,
                    showControls: false,
                    startAt: 81,
                    stopAt: 90,
                    opacity: 1,
                    showYTLogo: false,
                    loop: false,
                    ratio: 16/9,
                    gaTrack: false,
                },
                {
                    videoURL: "MASKED",
                    containment: 'body',
                    autoPlay: true,
                    mute: true,
                    useOnMobile: true,
                    showControls: false,
                    startAt: 558,
                    stopAt: 565,
                    opacity: 1,
                    showYTLogo: false,
                    loop: false,
                    ratio: 16/9,
                    gaTrack: false,
                },
                {
                    videoURL: "MASKED",
                    containment: 'body',
                    autoPlay: true,
                    mute: true,
                    useOnMobile: true,
                    showControls: false,
                    startAt: 643,
                    stopAt: 655,
                    opacity: 1,
                    showYTLogo: false,
                    loop: false,
                    ratio: 16/9,
                    gaTrack: false,
                },
                {
                    videoURL: "MASKED",
                    containment: 'body',
                    autoPlay: true,
                    mute: true,
                    useOnMobile: true,
                    showControls: false,
                    startAt: 2254,
                    stopAt: 2265,
                    opacity: 1,
                    showYTLogo: false,
                    loop: false,
                    ratio: 16/9,
                    gaTrack: false,
                },
                {
                    videoURL: "MASKED",
                    containment: 'body',
                    autoPlay: true,
                    mute: true,
                    useOnMobile: true,
                    showControls: false,
                    startAt: 1624,
                    stopAt: 1635,
                    opacity: 1,
                    showYTLogo: false,
                    loop: false,
                    ratio: 16/9,
                    gaTrack: false,
                }
            ];

            myPlayListPlayer = jQuery("#myPlayerID").YTPlaylist(videos, false, function (video) {

            });

        myPlayListPlayer.on("YTPData", function (e) {
        jQuery("#videoID").html(e.prop.id);
        jQuery("#videoTitle").html(e.prop.title);

      });

        });
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant