...

View Full Version : Embedding a file ?



Saz
10-28-2009, 01:22 PM
Anyone here know about embedding a file please ? How do you embed :

http://link.brightcove.com/services/player/bcpid1137883380?bctid=21337502001

into a website please ?

Any help appreciated.

Saz.

Rowsdower!
10-28-2009, 02:34 PM
I guess I'm confused by the question. Viewing the source code of your link shows how to embed the player and video:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>NEWS DEFAULT VIRAL ST_UIP</title>
<meta name="robots" content="index,follow,noarchive" />
<style type="text/css">body {background-color: #ffffff;margin:0px;padding:0px;}</style>
</head>
<body>
<!-- Start of Brightcove Player -->
<div style="display:none">

</div>
<script src="http://admin.brightcove.com/js/experience_util.js" type="text/javascript"></script>
<script type="text/javascript">
// By use of this code snippet, I agree to the Brightcove Publisher T and C
// found at http://corp.brightcove.com/legal/terms_publisher.cfm.

var config = new Array();

/*
* feel free to edit these configurations
* to modify the player experience
*/
config["videoId"] = null; //the default video loaded into the player
config["videoRef"] = null; //the default video loaded into the player by ref id specified in console
config["lineupId"] = null; //the default lineup loaded into the player
config["playerTag"] = null; //player tag used for identifying this page in brightcove reporting
config["autoStart"] = false; //tells the player to start playing video on load
config["preloadBackColor"] = "#FFFFFF"; //background color while loading the player


/*
* set the player's size using the parameters below
* to make this player dynamically resizable, set the width and height as a percentage
*/
config["width"] = 486;
config["height"] = 412;

/* do not edit these config items */
config["playerId"] = 1137883380;

createExperience(config, 8);
</script>
<!-- End of Brightcove Player --></body></html>

Copy and paste that code into your page and you should have video working. Do you have a link to a test page to show what you have been trying?

Saz
10-28-2009, 03:14 PM
Thanks, but tried that and still doesn't work ?

http://130609.com/embedding/

Rowsdower!
10-28-2009, 03:22 PM
It looks like the player gets loaded but it just can't find the video. Check your video URL next and make sure that it is correct.

Wait, nevermind, I see that it is generated by the javascript. Hmmm. I will take a look again in a little while but I have obligation to meet right now.

Saz
10-28-2009, 04:51 PM
It looks like the player gets loaded but it just can't find the video. Check your video URL next and make sure that it is correct.

Wait, nevermind, I see that it is generated by the javascript. Hmmm. I will take a look again in a little while but I have obligation to meet right now.
Thanks, is it an easy fix ?

Rowsdower!
10-28-2009, 06:51 PM
OK, here it is.

When I compared the video filepaths between your page and the example page I noticed two differences. Your filepath was missing two variables:

videoId=21337502001
fromLink=true

The second one is not important, but not having the first one is quite a big deal.

The file path to the video is being generated dynamically by the javascript. The javascript is reading the referring URL for a string to identify WHICH video to play. This means that your URL will have to contain the video id.

To illustrate what I am talking about, try pasting this URL into your address bar:
http://130609.com/embedding/?bctid=21337502001

Whatever value bctid has becomes the value for videoId so your video should start to play even though NONE of your code has changed...

Saz
10-28-2009, 07:18 PM
Thanks, but what would the correct, full code be please ?

It's currently :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en-gb">
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="/styles.css">
</head>
<body>
<table>
<tr>
<td>
<!-- Start of Brightcove Player -->
<div style="display:none">

</div>
<script src="http://admin.brightcove.com/js/experience_util.js" type="text/javascript"></script>
<script type="text/javascript">
// By use of this code snippet, I agree to the Brightcove Publisher T and C
// found at http://corp.brightcove.com/legal/terms_publisher.cfm.

var config = new Array();

/*
* feel free to edit these configurations
* to modify the player experience
*/
config["videoId"] = null; //the default video loaded into the player
config["videoRef"] = null; //the default video loaded into the player by ref id specified in console
config["lineupId"] = null; //the default lineup loaded into the player
config["playerTag"] = null; //player tag used for identifying this page in brightcove reporting
config["autoStart"] = false; //tells the player to start playing video on load
config["preloadBackColor"] = "#FFFFFF"; //background color while loading the player


/*
* set the player's size using the parameters below
* to make this player dynamically resizable, set the width and height as a percentage
*/
config["width"] = 486;
config["height"] = 412;

/* do not edit these config items */
config["playerId"] = 1137883380;

createExperience(config, 8);

</script>
<!-- End of Brightcove Player -->

</td>
</tr>
</table>
</body>
</html>

Rowsdower!
10-28-2009, 07:45 PM
You don't need to modify your code at all. Whatever code you already had on your test page was working. If that's the same as what you posted here then yes, that's the full working code (I haven't compared them side-by-side).

All you need to do to make a video play in your already existing page is add ?bctid=21337502001 to the end of your URL whenever you are navigating to your test page.

That's not very convenient, I admit, but it's just how that javascript works when it loads the player.

Saz
10-28-2009, 09:38 PM
Many thanks for keeping with this. It would be great if there was a neater way of doing it really.

I did try putting ?bctid=21337502001 at the end of the name of the folder, but then got a message that said that certain characters weren't allowed, like ?'s

Apostropartheid
10-28-2009, 10:27 PM
No, not at the end of the folder, at the end of the URL. Rowsow...flame man already provided the URL you need to use to access the page.

http://130609.com/embedding/?bctid=21337502001

The question mark signifies that what follows is a variable being passed onto the page. If you want to hide this, you'll have to use something called URL rewriting.

Rowsdower!
10-28-2009, 10:29 PM
You are misunderstanding me. There is nothing that you need to change about your file name, file folders, or source code on that page. The ONLY thing that dictates the file to be played is the string that the visitor to your website enters into their browser's address bar.

The only possible control you have over this is including the ?bctid=21337502001 part in links to your video page.

So instead of linking people to your video page like this:
<a href="http://130609.com/embedding/">View the Video</a>

You would do it like this:
<a href="http://130609.com/embedding/?bctid=21337502001">View the Video</a>

That's all you can do with this script to make it work as is. Now, if you are trying to do something like embed this video into your home page then that WILL NOT work like this. You might be able to save a local copy of the javascript and edit it to work the way you need it WITHOUT having your URLs look screwy but I haven't read the script thoroughly enough to say for certain.

What exactly are you intending to do with this embedded player? Do you need this particular player or are you OK with using some other FLV player?

If you are open to other players then I would recommend the JW FLV Player by Longtail.


No, not at the end of the folder, at the end of the URL. Rowsow...flame man already provided the URL you need to use to access the page.

http://130609.com/embedding/?bctid=21337502001

The question mark signifies that what follows is a variable being passed onto the page. If you want to hide this, you'll have to use something called URL rewriting.Yes, this is what I mean to say but I type too slowly... :D

Saz
10-28-2009, 10:54 PM
You are misunderstanding me. There is nothing that you need to change about your file name, file folders, or source code on that page. The ONLY thing that dictates the file to be played is the string that the visitor to your website enters into their browser's address bar.

The only possible control you have over this is including the ?bctid=21337502001 part in links to your video page.

So instead of linking people to your video page like this:
<a href="http://130609.com/embedding/">View the Video</a>

You would do it like this:
<a href="http://130609.com/embedding/?bctid=21337502001">View the Video</a>

That's all you can do with this script to make it work as is. Now, if you are trying to do something like embed this video into your home page then that WILL NOT work like this. You might be able to save a local copy of the javascript and edit it to work the way you need it WITHOUT having your URLs look screwy but I haven't read the script thoroughly enough to say for certain.

What exactly are you intending to do with this embedded player? Do you need this particular player or are you OK with using some other FLV player?

If you are open to other players then I would recommend the JW FLV Player by Longtail.

Yes, this is what I mean to say but I type too slowly... :D
Many thanks to your goodself and Apostropartheid for the help. I must admit to getting a tad confused, but am sticking with it :)

I'm not really fussed which player is used, I just want visitors to my home page to be able to view it straight away, without going to another website.

I do have access to my .htaccess if it helps with any re-writing.

The helps appreciated.

Saz
10-29-2009, 11:36 AM
If anyone has any ideas on it, please let me know. :thumbsup:

Rowsdower!
10-29-2009, 02:05 PM
Like I said in the last post, I would recommend you use the JW FLV player (found here (http://www.longtailvideo.com/players/jw-flv-player/)) and then feed in the correct URL for the video that you want to play.

Give this a try and if you can't make it work post back with a link to your new test page so we can see what you have tried.

Saz
10-29-2009, 02:10 PM
Thanks, but don't the users viewing the page, need to have that installed on their pc as well ?

Rowsdower!
10-29-2009, 02:15 PM
No, I believe it works using just flash (or at worst MS sliverlight - I can't remember for sure) which most users would already have.

At any rate, they wouldn't have to have this particular player installed anywhere, just the Flash and/or Silverlight browser plugins.

I re-read the longtail site. The FLV player that I linked you to operates with Flash. They also have a WMV player that I have used before and that's the one that uses Silverlight. So, to answer your question completely, NO, the user would only need to have flash enabled on their browser, just exactly like the player you are using now except that you can manipulate this one more easily.

Saz
10-29-2009, 02:23 PM
Thanks, so are you saying that I have to install a programme ?

Rowsdower!
10-29-2009, 02:28 PM
I guess that depends on your definition of "install." There is no executable (.exe) file so in that sense, no.

You will, however, have to upload the javascript, XML, and Flash files to your web server in order to actually host the player on your site. If you are looking at the desktop application of the JW player then you are in the wrong part of the longtail website.

If you get confused about implementation try the setup wizard that they provide:

http://www.longtailvideo.com/support/jw-player-setup-wizard

Saz
10-29-2009, 02:46 PM
I guess that depends on your definition of "install." There is no executable (.exe) file so in that sense, no.

You will, however, have to upload the javascript, XML, and Flash files to your web server in order to actually host the player on your site. If you are looking at the desktop application of the JW player then you are in the wrong part of the longtail website.

If you get confused about implementation try the setup wizard that they provide:

http://www.longtailvideo.com/support/jw-player-setup-wizard
Not your fault, but I'm getting way too confused for this, so will have to leave it ;-(

Thanks for your time.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum