Results 1 to 4 of 4

Thread: Beginner easy question

  1. #1
    Join Date
    Oct 2012
    Posts
    2

    Default Beginner easy question

    I am completely new to WOWZA. However my level of participation in this environment is the "web guy" I have been dealt the task of putting links on our site for the users to click on to go see the VOD's. Here in lies my dilemna. The SimpleVideoStreaming.html file does what we need to do, however, the Server and Stream fields we need to leave out.

    Here is my easy question, hopefully easy: How do I simply supply a link for our users to click on to automatically begin seeing a VOD?

  2. #2
    Join Date
    Jul 2009
    Posts
    135

    Default

    Sounds like you just need a different Flash player (the Wowza example one is obviously just for testing). I'd recommend JW Player -- it's pretty standard. Here's the Wowza tutorial on it:
    http://www.wowza.com/forums/content.php?48

    And my preferred JW tutorial:
    http://www.longtailvideo.com/support...html5-fallback

    If you put each video on a standalone page and link to it, you can add the autostart option to make it play automatically on page load:
        'autostart': 'true',
    Or, you can put the Javascript embed code right into your page in place of a link. That way you could embed multiple videos in one page, but let the user just click the play button on which one they want to see. Just be sure to give each div and jwplayer setup call a unique ID:
    <div id='mediaplayer1'></div>
    
    <script type="text/javascript">
      jwplayer('mediaplayer1').setup({
    
    ...
    
    <div id='mediaplayer'2></div>
    
    <script type="text/javascript">
      jwplayer('mediaplayer2').setup({

  3. #3
    Join Date
    Oct 2012
    Posts
    2

    Default

    Thanks for the tips. I will give those a see through. Judging by what you commented though, it seems as though I would have to create a page for every single video which is not going to be possible since there will be hundreds of them.

  4. #4
    Join Date
    Jul 2009
    Posts
    135

    Default

    You could just use one page for all of the videos, and just pass the different video filenames in a URL variable at the end. Like this:
    <a href="video.php?filename=video1.mp4">Video 1</a>
    Then on that one video page, grab the URL variable (using PHP, Javascript, etc.) and insert it into the embed code. Here's PHP:
    <script type='text/javascript' src='/jwplayer/jwplayer.js'></script>
    
    <div id='mediaplayer'></div>
    
    <script type="text/javascript">
      jwplayer('mediaplayer').setup({
        'id': 'playerID',
        'width': '480',
        'height': '270',
        'provider': 'rtmp',
        'streamer': 'rtmp://rtmp.example.com/application',
        'file': '<?php echo $_GET['filename']; ?>',
        'image': 'http://example.com/thumbs/sintel.jpg',
        'modes': [
            {type: 'flash', src: 'player.swf'},
            {
              type: 'html5',
              config: {
               'file': '/videos/<?php echo $_GET['filename']; ?>',
               'provider': 'video'
              }
            },
            {
              type: 'download',
              config: {
               'file': '/videos/<?php echo $_GET['filename']; ?>',
               'provider': 'video'
              }
            }
        ]
      });
    </script>
    Or you could grab the URL variable with Javascript too:
    http://papermashup.com/read-url-get-...ithjavascript/

    You could do the same with the main page too to generate the links (or the embed code) -- just store the filenames in an array (again, PHP, Javascript, whatever), and loop through them generating the links/code with each filename dynamically inserted.

Similar Threads

  1. Beginner
    By xtm.ro in forum Wowza Media Server 3 for Amazon EC2 Discussion
    Replies: 1
    Last Post: 02-29-2012, 06:39 AM
  2. Media Type Question - Beginner
    By anujgakhar in forum Video On Demand Streaming Discussion
    Replies: 1
    Last Post: 10-20-2011, 04:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •