Category: JW FLV Player

Multiple JW players on a page, revised for JW Player 4.7

The JW Player is a very popular open-source media player which not only supports many video, audio and image formats, but has many scriptable behaviors. Here we’ll make use of the JavaScript API to generate as many players as you want on a page. The generated players all have separate event listeners to keep them from interfering with each other. Events or actions executed in one player do not affect others.

Article Outline

  • Add placeholders for each player
  • Playlists
  • Call the init function
  • This is a new version of that was compatible with an earlier version of the JW Player. This one has been updated to work with JW Player 4.7.761 and later.

  • Continue reading

    JW FLV player with Javascript playlist

    Screen shot 2009-12-17 at 1.06.07 PM.jpg

    This is an example of how to create a javascript-based Playlist selector for a JW FLV player. The playlist selector menu has 3 sections that toggle open and closed when you click on them. This allows the user to switch playlists, choosing from various topics.

    The source code has not been cleaned up, but you should be able to get an idea of how to set this up from it.

    Continue reading

    Infinite JW FLV players on a page, with error catching for Red5 bug

    NOTE: this has been revised to make it more flexible, and allow multiple streamers and multiple video types, using the same code.

    This is a script that allows you to add as many JW FLV players to a page as you want, using a single block of code. The players all have separate event listeners to keep them from interfering with each other. Events or actions executed in one player do not affect others.

    This particular demo also corrects for a problem we have noticed recently with Red5, where RTMP streams will hang with a “BUFFER.EMPTY” status code. I’ve set up meta-monitoring so that it catches “BUFFER.EMPTY” codes and starts the player up again a little bit previous to the break. It creates player names and function names dynamically, based on how many players you request. If this function seems to be giving you problems, if your videos start jumping back and restarting a lot, search for the following line and comment it out by adding “//” in front of it:

    window["player_"+obj.id].sendEvent('SEEK', parseInt(window["positionarray_"+obj.id][3])+100);
    

    We’ve also had problems with some videos that simply refuse to stream, although they will play using progressive download. You can use a mixture of streaming and non-streaming by altering the playlist for each video.

    Screen shot 2009-10-30 at 5.44.32 PM.jpg


    Continue reading

    JW FLV Player and Red5 apparent buffering bug

    Update 12-18-09: Longtailvideo has apparently resolved this bug with its player v.4.7beta. At this time v. 5 does NOT have the fix in it. The code changes that fixed the bug can be seen here: [Changes to RTMPModel.as]

    A few months ago, we installed Red5 0.7.0 on a Windows server to stream Flash video inside the firewall. This server is used mainly to stream short clips that are embedded in learning modules.

    The JW FLV player v. 4.6 is included in the learning module template and enables us to display the videos with a high degree of flexibility.

    Picture 41.jpeg

    Example of a player that contains multiple short video clips.
    The player generates a navigation listing on the right from the XML playlist.


    Continue reading

    JW FLV player that switches playlists on the fly

    The JW FLV player is a versatile, customizable and scriptable flash video player, available from Longtailvideo.com. The player was recently upgraded, and many details in the scripting and playlists had to change to remain compatible. I’m posting examples of some of the players I’ve created lately, using the latest version of the player and SWFObject.

    Versions

  • Player: JW FLV player 4.6
  • SWFObject: 2.1
  • Red5 Streaming server using RTMPT or RTMP
  • This is an example of a current-version player that changes playlists on the fly when you click a link or button.

    I can’t show you a working demo because I don’t have an external Red5 server but here is how it looks. When the page loads, the player loads the first playlist.

    Safari003.jpg

    Continue reading

    JW FLV player 4.6: Two or more players on a page

    The JW FLV player is a versatile, customizable and scriptable flash video player, available from Longtailvideo.com. The player was recently upgraded, and many details in the scripting and playlists had to change to remain compatible. Since it can be difficult to figure out the details of the necessary changes, I’m posting examples of some of the players I’ve created lately, using the latest version of the player and SWFObject.

    Versions

    • Player: JW FLV player 4.6
    • SWFObject: 2.1
    • Red5 Streaming server using RTMPT or RTMP

    This is an example of how to put two or more JW FLV players on a page, side by side. I can’t show you a working demo because I don’t have an external Red5 server but here is how it looks.

    Picture 35.jpg

    Continue reading

    JW Player example: two streaming flash players that clip to hard stop in a single page

    The authors of our learning modules often want to embed one one or more videos embedded in a page. A typical request is to be able to “edit” the video using a duration set in the playist, so that the player shows only a few seconds of the video, focusing on only the relevant material for the current page.

    Continue reading

    Troubleshooting Jeroen Wijering’s FLV player in your HTML

    There are some errors that come up time and time again when working with Jeroen Wijering’s Flash Video Player. Here’s how to troubleshoot them. I’ll keep adding to the list as time permits. Click the images to see a larger view.

    Continue reading

    A SCORM-ready template: Part 2A. Add Flash Video to your learning module

    What files are required to add video to your learning module?

    The player we are using for embedding streaming media into the SCORM template. is the Jeroen Wigering media player. Some of the necessary files are already included in the template and do not need to be touched:

    1. includes/mediaPlayer.swf (already included in template)
      this file generates the player according to the settings you include in the content page.
      mediaPlayer
    2. js/swfObject.js (see for more info on swfObject
      this file contains the code necessary to avoid the ActiveX problem with embedded SWFs in Internet Explorer, and generates embed code used by other browsers. A reference to this file already exists in the head of each module page, so you do not need to include it again.
      swfObject
    Continue reading