We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

FLV Media Player 4.5

Development and Programming

Michael C. (ProImage)'s avatar
Michael C. (ProImage)
102 posts
16 years ago
Michael C. (ProImage)'s avatar Michael C. (ProImage)

Quick feature request: can we have the ability to specify a class=”” parameter on the player, for CSS, etc? I tried hacking it in but it didn’t work; I think I was getting thrown by it outputting code for the swfobject instead of HTML… Thanks!

       
Jeremy Schultz's avatar
Jeremy Schultz
68 posts
16 years ago
Jeremy Schultz's avatar Jeremy Schultz

I am having a really hard time with this plug-in, I installed everything and it appears to access the js properly but the code I insert doesn’t do anything, it just sits there:

{exp:flvplugin playerpath="player.swf" file="{custom_video_field}" playernumber="{entry_id}" screencolor="151d4a" width="400" height="302"}

I’m guessing I don’t know what to do with {custom_video_field}, so I tried using it to get the FLV URL but the code is still treated as plain text. :(

Jeremy

       
smartpill's avatar
smartpill
456 posts
16 years ago
smartpill's avatar smartpill
I am having a really hard time with this plug-in, I installed everything and it appears to access the js properly but the code I insert doesn’t do anything, it just sits there:
{exp:flvplugin playerpath="player.swf" file="{custom_video_field}" playernumber="{entry_id}" screencolor="151d4a" width="400" height="302"}
I’m guessing I don’t know what to do with {custom_video_field}, so I tried using it to get the FLV URL but the code is still treated as plain text. :( Jeremy

Your custom field short name that has the video URL in it should be where you have “{custom_video_field}”. Do you have a link to the page so we can see what’s broken? Usually, either 1. the link to one of the parts is incomplete or wrong, 2. the “Automatically turn URLs into Links” option is checked, which breaks the video link, 3. The wrong version of swfobject.js is being used (should be version 2 or higher) or 4. one of the files wasn’t uploaded properly and the file is corrupt.

       
Jeremy Schultz's avatar
Jeremy Schultz
68 posts
16 years ago
Jeremy Schultz's avatar Jeremy Schultz

Here’s the page: http://staging.jeremyschultz.com/index.php/news/13cares

And the code I put in the body field of my entry:

{exp:flvplugin playerpath="{site_url}player.swf" file="https://ellislab.com/asset/images/team-photo/luvern-whotv.flv" playernumber="{entry_id}" width="400" height="302"}
<div id="player{entry_id}"></div>

The code just shows up as plain text on the page:

{exp:flvplugin playerpath=”{site_url}player.swf" file="http://staging.jeremyschultz.com/files/luvern-whotv.flv" playernumber="{entry_id}” width=“400” height=“302”}</code></pre>

Something seems really weird, because https://ellislab.com/asset/images/team-photo/ converts properly on the page but {site_url} and {entry_id} do not.

I've tried using verified absolute links in the code to make sure assets are there, but it doesn't do anything. I did try turning off the automatic URLs and and have also verified the version of swfobject (2.2). I have to suspect there's something wrong with parsing the code. The source code of the rendered page shows this:

<pre><code><p>{exp:flvplugin playerpath=”{site_url}player.swf" file="http://staging.jeremyschultz.com/files/luvern-whotv.flv" playernumber="{entry_id}” width=“400” height=“302”}
</p><div id="player{entry_id}"></div>
       
smartpill's avatar
smartpill
456 posts
16 years ago
smartpill's avatar smartpill
Here’s the page: http://staging.jeremyschultz.com/index.php/news/13cares And the code I put in the body field of my entry:
{exp:flvplugin playerpath="{site_url}player.swf" file="https://ellislab.com/asset/images/team-photo/luvern-whotv.flv" playernumber="{entry_id}" width="400" height="302"}
<div id="player{entry_id}"></div>
The code just shows up as plain text on the page:
{exp:flvplugin playerpath=”{site_url}player.swf" file="http://staging.jeremyschultz.com/files/luvern-whotv.flv" playernumber="{entry_id}” width=“400” height=“302”}</code></pre>

Something seems really weird, because https://ellislab.com/asset/images/team-photo/ converts properly on the page but {site_url} and {entry_id} do not.

I've tried using verified absolute links in the code to make sure assets are there, but it doesn't do anything. I did try turning off the automatic URLs and and have also verified the version of swfobject (2.2). I have to suspect there's something wrong with parsing the code. The source code of the rendered page shows this:

<pre><code><p>{exp:flvplugin playerpath=”{site_url}player.swf" file="http://staging.jeremyschultz.com/files/luvern-whotv.flv" playernumber="{entry_id}” width=“400” height=“302”}
</p><div id="player{entry_id}"></div>

Two main issues. 1. You don’t put the code in any entry field, you put it in the template. 2. Make sure you are using straight quotes, not curly quotes. The weird conversion

“302”

is from using curly quotes.

       
Jeremy Schultz's avatar
Jeremy Schultz
68 posts
16 years ago
Jeremy Schultz's avatar Jeremy Schultz

Not having the code in the template is what threw me off! The code example at 5pieces didn’t separate template code from publish page code, and I couldn’t tell they were to go separate places. I’ve inserted it and created a video upload field, and now I have a video player that says “This playlist is not a valid XML file.” I’m hoping some work with the settings will get this resolved.

I really wish the page over at 5pieces had directions for the deployment of this plug-in. Uploading and configuring is easy but actually putting it in the entry system is not covered. :(

Jeremy

       
Jeremy Schultz's avatar
Jeremy Schultz
68 posts
16 years ago
Jeremy Schultz's avatar Jeremy Schultz

I’m really close now, I have the video playing on the page and everything looks good! The only problem is the {video_field} and {entry_id} tags are not honored, and I have to manually write them in on the template and page to make them work.

{exp:flvplugin playerpath="{site_url}scripts/player.swf" file="{video}" playernumber="{entry_id}" width="400" height="225"}

I checked the final page’s source code and file: {video} and id: {entry_id}. The div in the content also remains id=”player{entry_id}”.

       
smartpill's avatar
smartpill
456 posts
16 years ago
smartpill's avatar smartpill

Progress! Copy the whole template here. It’s probably where you put the code that’s the remaining problem.

       
Jeremy Schultz's avatar
Jeremy Schultz
68 posts
16 years ago
Jeremy Schultz's avatar Jeremy Schultz

This is from my template:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html >
<head>
{embed="templates/_htmlhead"}
</head>
<body>
[removed][removed]
<div id="header">
{embed="templates/_header"}
</div>
<div id="content">
  <div id="banner-wrapper">
{embed="templates/_banner-wrapper"}
  </div>
  [removed][removed]
  <div id="main-content" class="column">
{exp:flvplugin playerpath="{site_url}scripts/player.swf" file="{site_url}files/luvern-whotv.flv" playernumber="30" width="400" height="225"}

This template consists of the top half of my pages, and some smaller templates embed into it. I placed the flvplugin code at the end, right before the content comes into the page. I can’t imagine where it might need to go. BTW, this code above has the replaced {video} and {entry_id} tags in order for the page to work at the moment.

       
smartpill's avatar
smartpill
456 posts
16 years ago
smartpill's avatar smartpill

The code has to be somewhere within the weblog:entries tag loop, so after the opening

{exp:weblog:entries...}

tag and before the closing

{/exp:weblog:entries}

tag. I don’t see that in you template at all.

       
Jeremy Schultz's avatar
Jeremy Schultz
68 posts
16 years ago
Jeremy Schultz's avatar Jeremy Schultz

This template I showed embeds on the top of all my weblog index pages, which have the weblog:entries tags. I put this code in that tag and it didn’t work, but I realized the <div id=”player{entry_id}”></div> also belongs in the template. Now the video works great!

But this raises a question: if the div is placed in the template, how can the user control where the video appears on the page? I had envisioned adding a Video button to the HTML controls so the user could click, generate the div in the content area, and “place” the video in that spot. If it’s impossible with FLV Media Player then that’s OK, I’ve placed the code above the {body} output and it will stay there, but I assumed the solution would allow video to be “placed” a lot like an image is.

Jeremy

       
smartpill's avatar
smartpill
456 posts
16 years ago
smartpill's avatar smartpill
This template I showed embeds on the top of all my weblog index pages, which have the weblog:entries tags. I can put this code on all those templates and see if it works. Jeremy

Whichever one is pulling in the entry title and text is the one it should be in. If you have duplicates it probably won’t output the video since you’d have multiple places where the video is supposed to appear and the plugin code looks for a unique “id” to match in that DIV you put at the end of the code. If it finds more than one of the same ID, it may just fail.

       
Jeremy Schultz's avatar
Jeremy Schultz
68 posts
16 years ago
Jeremy Schultz's avatar Jeremy Schultz

Kyle, I think I revised my post since you responded but what you wrote applies to what I revised. So it looks like it produces one video per entry, which I guess would negate the possibility of a video button to place (and place and place) instances of video. That’s a bummer but at this point I am just happy it plays and works well.

The site only has one video on it anyway so I’m in good shape now, but it leaves the possibility open that the customer will someday want to do multiple videos and have a problem. I guess that’s what the playlist option might be for.

Thanks Kyle for your help! This problem was a bad experience but you helped me through it. If I survive EE I’ll pitch in and help the community in the future. 😊

Jeremy

       
smartpill's avatar
smartpill
456 posts
16 years ago
smartpill's avatar smartpill
Kyle, I think I revised my post since you responded but what you wrote applies to what I revised. So it looks like it produces one video per entry, which I guess would negate the possibility of a video button to place (and place and place) instances of video. That’s a bummer but at this point I am just happy it plays and works well. The site only has one video on it anyway so I’m in good shape now, but it leaves the possibility open that the customer will someday want to do multiple videos and have a problem. I guess that’s what the playlist option might be for. Thanks Kyle for your help! This problem was a bad experience but you helped me through it. If I survive EE I’ll pitch in and help the community in the future. 😊 Jeremy

You’re welcome. There are ways to get multiple videos in there besides the playlist you just have to get a bit creative. The trick is to output unique IDs. This can be done with separate custom fields, or using a category page to output multiple entries or using Fieldframe Matrix or related entries. Once you spend some time with EE it’ll click in. I switched to EE exclusively a few years back after hitting the limitations of a number of other CMS’s. There’s somewhat of a learning curve with EE but once you “get it” you can twist it into all sorts of things. Good luck!

       
Jeremy Schultz's avatar
Jeremy Schultz
68 posts
16 years ago
Jeremy Schultz's avatar Jeremy Schultz

Thanks Kyle. I just found another thing that I’ll need to get creative on: the solution as it stands does put a video player on every page, even when there’s no video. I expect I’ll need to create some conditional statement that uses the code if {video} exists.

Jeremy

       
First 2 3 4 5

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.