1 Reply Latest reply on May 1, 2015 2:15 AM by Robyn_cpl

    How to let the MP4 run in IOS?

    zwn_taylor

      var vid = sym.$("video");

      //vid.html('<video src="media/Gvideo.ogv" autoplay="yes" loop="yes" type="video/ogv" width="100%"></video>');

      vid.html('<video src="media/Gvideo.mp4" autoplay="yes" loop="yes" type="video/mp4" width="100%"></video>');

       

      Can not run in IOS?

        • 1. Re: How to let the MP4 run in IOS?
          Robyn_cpl Level 2

          Hi,

           

          I use this code for videos and it works fine on an ipad. But you will have to add your video online somewhere to get the url.

           

          var vidctr = sym.$('_video_housing_');

          vidctr.html('<video style="width:100px; height:100px;" controls><source src="_video_url_"></video>');

          var vid = $(vidctr).children().first();

          $(vid).bind('ended', function()

          {

                   _ended_function_

          });

           

          The _video_housing_ is a rectangle the same size as your video.

          The width and height is the same size as the rectangle and video.

          _video_url_ is your video link.

          The _ended_function_ is where you can add code once the video has finished.

           

          I hope this is what you are looking for, it does defiantly work since I use this for every video.