Skip to content

Enable AutoPlay & Stop for Videos  #19

@technopagan

Description

@technopagan

Research if there's a way to have remark.js etc. autoplay HTML5 local video on switching to a slide with video on it.

Some Links:

This is the data structure of each slide's data:
,[object Object],
,[object Object],
,[object Object],

Previous attempts to code this:

            // Events: 'showSlide', 'hideSlide', 'beforeShowSlide', 'afterShowSlide', 'beforeHideSlide', 'afterHideSlide', 'toggledPresenter'

          slideshow.on('showSlide', function(slide) {
             var slideName = slide.properties.name;
             // console.log(slideName);

             console.dir(slide.content);
            if (slide.content[1] !== null && typeof slide.content[1] === 'object') {
                console.dir(slide.content[1].content);
                // slide.content[1].content.getElementsByTagName('video')[0].setAttribute('autoplay','');
                // console.dir(slide.content[1].content['video']);
            } 
             // console.dir(slide.content.keys()); // console: ['foo']
             /* if(document.querySelector('video')){ // checks if element is playing right now
                 alert('Boom!');
            }*/
          });

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions