1 Reply Latest reply on Feb 8, 2011 7:49 AM by __brndn__

    Seeking composite elements

    __brndn__

      Hi all,

       

      I am trying to wire up a player which uses a playlist compositionElement.

      Control bar is from the chromeLibrary.

       

      it seems to be quite flexible. However I am running into some oddness when I try to seek through the timeline.

       

       

      I can see the issue is with the way it gets the SeekTrait from the current Media. however. this restricts seeking completely.

       

      And renders one of the the most important features of the plugin/library useless.

       

      Here is the cause.

      var seekable:SeekTrait = media ? media.getTrait(MediaTraitType.SEEK) as SeekTrait : null;

       

              if (temporal && seekable) {

       

                  var time:Number
                          = (temporal.duration * (scrubber.x - scrubberStart))
                          / scrubber.range;

       

                  if (seekable.canSeekTo(time)) {
                      seekable.addEventListener(SeekEvent.SEEKING_CHANGE, onSeekingChange)
                      seekToTime = time;
                      seekable.seek(time);
                  }
              }

       

       

      so example is if I try to seek(300) but the current media has a duration of 100, then the media seek will not work...

       

       

       

      Below is the mediaSequence passed in using the SMILDocument approach.

       

       

        <body>
                  <seq>
                      <video src="rtmp://streamingserver.net/path/mp4:h264/clip.mp4">
                          <metadata>
                              <meta content="advert" name="contentType"/>
                          </metadata>
                      </video>
                      <par>
                           <video src="rtmp://streamingserver.net/path/mp4:h264/clip.mp4"
                                  system-bitrate="844000" dur="852" clipEnd="30" clipBegin="0">
                              <metadata>
                                  <meta content="mainContent" name="contentType"/>
                              </metadata>
                          </video>
                          <img
                                    src="http://site.com/i/cms/images/presentation/overlay.png">
                               <metadata>
                                   <meta content="overlayImage"  name="contentType"/>
                               </metadata>
                           </img>
                      </par>

       

                       <video src="rtmp://streamingserver.net/path/mp4:h264/clip.mp4">
                          <metadata>
                              <meta content="advert" name="contentType"/>
                      </video>

       

                      <par>
                          <video
                                 <video src="rtmp://streamingserver.net/path/mp4:h264/clip.mp4"
                                  system-bitrate="844000" dur="852" clipEnd="120" clipBegin="30">
                              <metadata>
                                  <meta content="mainContent" name="contentType"/>
                              </metadata>
                          </video>
                          <img
                                   src="http://site.com/i/cms/images/presentation/overlay.png">
                              <metadata>
                                  <meta content="dogImage" name="contentType"/>
                              </metadata>
                          </img>
                      </par>

       

                      <video src="rtmp://streamingserver.net/path/mp4:h264/clip.mp4">
                          <metadata>
                              <meta content="advert" name="contentType"/>
        
                      </video>

       

                      <par>
                          <video
                                  <video src="rtmp://streamingserver.net/path/mp4:h264/clip.mp4"
                                  system-bitrate="844000" dur="852" clipEnd="852" clipBegin="120">
                              <metadata>
                                  <meta content="mainContent" name="contentType"/>
                              </metadata>
                          </video>
                          <img
                                  src="http://site.com/i/cms/images/presentation/overlay.png">
                              <metadata>
                                  <meta content="overlayImage" name="contentType"/>
                              </metadata>
                          </img>
                      </par>
                  </seq>

       

      any suggestions are much welcome.