3 Replies Latest reply on May 21, 2010 12:45 PM by DilipShah

    defining a video element

    DilipShah Level 1
      How can I define a video element that includes only a part of the video?  When playing, the player should seek to a specified time t1 and then play for the specified duration.

      I'm trying to implement SMIL syntax as  follows:

                  <video
                       src="vid11981.flv"
                      id="103"
                       clip-begin="20s"
                      dur="10s"
                       region="video_right"
                  />

      How can I create a video element that will seek to 20 sec and play for 10  seconds?

       

      I read about the current version of OSMF having limited SMIL implementation in the form of a plugin. Are there any examples / documentation on it?

       

      Thanks!

       

        • 1. Re: defining a video element
          RyanOConnell

          Hi DillipShah,

           

          I couldn't find a SMIL sample in the repository, but your example looks like it has an error.  Sub clips use there two attributes clipBegin and clipEnd.  They also don't have the 's' at the end, all values are assumed to be seconds.  The other issue is the video url is relative, which means it may not work if your clips isn't stored in the same directory as your player.  I'm also not sure if regions are supported yet.

           

          The SMIL plugin can be loaded using the MediaFactory, for an example on how to use a plugin, see the MASTSample in the trunk/apps/plugins folder of the source tree.  Optionally, if you don't need SMIL, you can create a subclip by specifying start and end times to the StreamingURLResource's constructor.

          • 2. Re: defining a video element
            charles_newman-cSBPmR

            The AkamaiPluginSample is the SMIL plugin sample

             

            And yes, the SMIL plugin does support sub-clips.

             

            - charles

            1 person found this helpful
            • 3. Re: defining a video element
              DilipShah Level 1

              Ryan and Charles, appreciate your response!