Link to home
Start Free TrialLog in
Avatar of hnmcc
hnmcc

asked on

Embedding Flash player in webpage

I need to stream videos into the members-only area of a website.  Overall demand will be small, but it may have spikes.  Cost is a consideration for the website owner, a small professional body.

We are trialling Amazon S3 + EC2+ Cloudfront + embedded JW Player.  The S3 bucket contains two small MP4 files in the main bucket, together with a sub-folder holding:
jwplayer.js
swfobject.js (version 1.5)
player.swf

The trial page HTML is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Streaming Trial</title>
<script type="text/javascript" src="http://biostrial.s3.amazonaws.com/jwplayer/swfobject.js"></script>
</head>
<body>
<p>Arnoldi</p>

<div id='container'>The player will be placed here</div>

<script type="text/javascript">
  var flashvars = {

    file:'Arnoldi.mp4',
    streamer:'rtmp://s2y98ylrybvg3y.cloudfront.net/cfx/st/'
  };

  swfobject.embedSWF('http://biostrial.s3.amazonaws.com/jwplayer/player.swf','container','480','270','9.0.115','false', flashvars,

   {allowfullscreen:'true',allowscriptaccess:'always'},
   {id:'jwplayer',name:'jwplayer'}

  );
</script>


<!-- <embed
	flashvars="type=rtmp&amp;streamer=rtmp://s2y98ylrybvg3y.cloudfront.net/cfx/st/&amp;file=Arnoldi.mp4">
   id="xvideo-3715"
   type="application/x-shockwave-flash"
   width="320"
   height="260"
   src="http://biostrial.s3.amazonaws.com/jwplayer/player.swf"
   quality="high"
   allowfullscreen="true"
   wmode="transparent"
</embed> -->

</body>
</html>

Open in new window


The embedding code comes from the JW player site (http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/13/embedding-flash).  The other version, commented out, is from Learning API (http://www.learningapi.com/streamingmedia-articles/amazon-cloudfront-streaming/) - it looks wrong to me, but other people seem to have made it work.

Neither work for me.  I am assuming that this is because I am doing something obviously wrong, perhaps because my knowledge of Javascript is effectively non-existent.

Where have I gone wrong?
ASKER CERTIFIED SOLUTION
Avatar of dgofman
dgofman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.