video.Maru
by polyGeek polyGeek logo



 

video.Maru 3.5 beta

December 21st, 2007 . by polyGeek

One of the most common requests I’ve had is to make it so that the XML playlists would scroll. We’ll you don’t have to request it any more. Here it is. ( download FLA )

Here’s the gist of how it works. There will be more extensive documentation shortly as I’m still working on a few scrolling features.

  1. Use the linkBTNholder to position your XML playlist.
  2. If there are the following scroll controls: scrollUp, scrollDn, and ScrollThumb, then linkBTNholder will then be used as a mask for the linkBTNs.
  3. The scroll controls will automatically snap to their correct position. Make sure that everything has a registration point in the upper-left corner or they will appear out of place.

That pretty much does it.
The startPlay button has been updated. Now when you use it it will capture a bitmap copy of the first frame of the video and then close the Netstream object so that there is no further download. When the user clicks on the startPlay button the Netstream object will be recreated and download will begin. This is mainly to save bandwidth for those who have long videos on a page that people may not ever watch.

The bitmap copy of the first frame of video is called freezeFrame. There are API getters/setters to read/change it’s width/height and x/y values, and add a callback for when the freezeFrame is created.

Here’s an example of it in action. Not that it looks any different.

The API has gotten a handful of additional hooks: ( remember, all API calls begin with videoMaru. )

  1. closeNetstream() - this closes the Netstream object and halts further download of the stream. It also stops playing the video. When another video is selected a new Netstream object is created automatically.
  2. setVideoComplete( fn:Function ) - has been changed to setOnVideoComplete. That was a mistake on my part that broke with the naming convention of setting callBack functions.
  3. FreezeFrame : getFreezeFrameHeight():Number, getFreezeFrameWidth():Number, getFreezeFrameX():Number, getFreezeFrameY():Number, setFreezeFramePosition( x,y ), setFreezeFrameDimensions( w, h ), setOnFreezeFrameCreated( fn:Function )
  4. getTimePlayed():Number, getTimeRemaining():Number : both of these return a number of seconds.
  5. enableMouseSeeking( boolean ) - if set to true it allows the user to click on the timeline directly to seek in addition to using the playhead to scrub. This can also be enabled without the API by naming the timeline “timeLineSeek”.
  6. setVideoWindowSizeToMeta() - change the videoWindow’s width/height to the values reported in the FLV metaData.
  7. setVideoWindowSizeToStage() - change the videoWindow’s widght/height to the size of the FLA Stage.
  8. setCaptionXML( path/FileName ) - change the source of the captions file. This way you can do multiple languages. The captions being displayed will automatically catch up to the timePlayed in the video.
  9. setTimeFixedWidth( boolean ) - it forces the timeDisplays to show 00:00:00 instead of 0:00:00

There are a few more features to add. When that’s done and I’m satisfied that the bugs have been ironed out I’ll release video.Maru 3.5. That will probably be sometime in early 2008. Pop over to the Suggestions/Bugs page if you want to see what’s on the list.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Technorati
  • del.icio.us
  • Facebook
  • Google
  • StumbleUpon

17 Responses to “video.Maru 3.5 beta”

  1. comment number 1 by: Luciano

    hey Dan,

    I’ve mailed you a couple more requests. hope it’s not too late for them.

    best regards.

  2. comment number 2 by: Will

    These are nice! how do i get them to playing streaming from media server? If I put in the rtmp address in the XML file, it only plays once and stops.

  3. comment number 3 by: polyGeek

    @Will, Do you mean that you want to videos to loop? That might be a problem with files streamed through RTMP. The video events that work with progressive downloads don’t work the same way with streaming. I’ll take a look at it and see if I can get RTMPs to loop for you.

  4. comment number 4 by: Will

    I am trying to get the RTMP address to work, do I just add it into the url in the XML file?

  5. comment number 5 by: Will

    For instance, on the 59_XML scrolling playlist file about, there was no xml file to down load with it, so I used the on from 64_scrollingExample.xml. Maybe it is set up differently that the 59_XML file in the FLA.

  6. comment number 6 by: polyGeek

    @Will, sorry, I just added the XML to the 59_scrollingXMLplaylist.zip file.

    Yes, to do RTMP just add it as the path like this:
    path=”rtmp://domain.com/path/file.flv”

  7. comment number 7 by: will

    Hey works find now, I will go through some of the video tutorials to see all the other tips.

    Thanks alot man.

  8. comment number 8 by: will

    Hi

    I see what you are saying about the streaming events compared to the progressive: I am having a hard time trying to read or capture any meta data from the streaming to handle the videos.

  9. comment number 9 by: will

    Hello

    What would be nice, is while on playnext, the next thumbnail would slide to the top, of the list so after each movie, the thumbnail list would move up. Is that posibile?

  10. comment number 10 by: will

    How would I make the buttons line up horizonally?

  11. comment number 11 by: DataVAMP

    Hi. I would like the first video to play on page load. Right now it just sits there untill someone clicks on an item in the playlist. Also the first item is selected but when the user clicks play nothing happens. You have to hit the second item on the list, then the first. I’m using the latest version of this code too.

  12. comment number 12 by: will

    Hi DataVAMP

    I happened to me also, but I found the fix in the documentation. If you have it set to autoplay in the XML file, check the pause play button in the flash, make sure the instance name is “play_btn” then it will play on load, if it is on pause_btn, it will pause on open. Let me know if it works.

  13. comment number 13 by: polyGeek

    @Will, good idea. I’ve added that to the suggestions list , #20.

  14. comment number 14 by: polyGeek

    @Will, in the xml settings node use: horizontalButtonPadding=”number” instead of verticalButtonPadding. That should do it for you.

    I really need to do more video tutorials for things like that. When videoMaru 3.5 is finished I plan on doing a few video tutorials a week.

  15. comment number 15 by: polyGeek

    @Will, Are you using a play_btn or pause_btn? Also, look at adding: autoPlayVideo=”true” to the first video node.

  16. comment number 16 by: Will

    Thanks man, it is coming along ok,
    I saw in your updates that you had fixed the:
    ( fixed ) The setVideoComplete function doesn’t work on a video that is streamed with RTMP.

    and the ( fixed ) videos encoded with Sorensen Squeeze don’t issue the onVideoComplete event or loop properly. Most of our videos are encoded with the Sorensen Squeeze so that probally is what our problem is. Is a specific action I have to do on my part or code to put to get around this?

  17. comment number 17 by: polyGeek

    @Will, download the latest 3.5 beta and see if it works for you. I changed the method of detecting when a video ends - as a user suggested. I think this will be fail proof because it doesn’t rely on any native events.

Leave a Reply

Name

Mail (never published)

Website