homepage Welcome to WebmasterWorld Guest from 54.227.17.116
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / WebmasterWorld / Web Video Creation and Optimization
Forum Library, Charter, Moderators: travelin cat

Web Video Creation and Optimization Forum

    
Newbie--How do I code my video to play automatically on page open?
video, youtube video, embedding, automatically play, full screen, preload
donna130




msg:4225382
 12:53 pm on Nov 2, 2010 (gmt 0)

2 related questions, thank you. First, I have a neat, related video I'd like to share with our customers as they enter one of our pages. The video's .mp4, but it's my first video, so I just don't know how to code it to
    play automatically and in full screen when they arrive at the page (and before anything else opens
).

Second, related question: I have the youtube embed link already for the video. Can I accomplish this with the youtube embed code?

Thanks for exact code or where to put it. I use html. Thanks so much if you can help.

 

SevenCubed




msg:4225411
 2:11 pm on Nov 2, 2010 (gmt 0)

This following code conforms to XHTML 1.1 and Section 508 for accessibility:

<p style="text-align:center;"><object type="application/x-shockwave-flash"
data="http://www.youtube.com/v/REPLACE_THIS_CODE_WITH_YOUR_VIDEO_REFERENCE&amp;
hl=en_US&amp;fs=1&amp;rel=0&amp;color1=0x234900&amp;color2=0x4e9e00&amp;
border=1&amp;autoplay=1" allowfullscreen="true" width="640" height="400">
<param name="movie" value="http://www.youtube.com/v/REPLACE_THIS_CODE_WITH_YOUR_VIDEO_REFERENCE&amp;hl=en_US&amp;fs=1&amp;
rel=0&amp;color1=0x234900&amp;color2=0x4e9e00&amp;border=1" /><param name="FlashVars" value="playerMode=embedded" /><span>It appears you have do not have, or have disabled, the <a href="http://get.adobe.com/flashplayer/" title="Flash Plugin" rel="nofollow">Flash</a> plugin that is required for this presentation.</span><param name="wmode" value="transparent" /></object></p>


In the above code replace what I've highlighted in CAPS with your actual video reference ID.

It is embedded and will autoplay but will not play in fullscreen mode. I've tried a few different parameters for fullscreen on page load but couldn't get it to work. It can be played full screen if the visitor clicks the button to switch to that mode.

Maybe someone else will jump in here and add to it for fullscreen on page load. But, it's typically not a good idea to push something like that to a visitor, I would hit the back button and leave -- but that's not the reason for not providing a method to produce that, I tried and couldn't get it to work.

[edited by: bill at 12:36 am (utc) on Nov 15, 2010]
[edit reason] fixed sidescroll issue with code [/edit]

donna130




msg:4225419
 2:32 pm on Nov 2, 2010 (gmt 0)

Thanx 7C,

So we can help others too while helping myself, here's more useful information I found:

I read that adding the string &ap=%2526fmt%3D22 t both instances of the URL link within the embed video can allow for “HD (High Definition) Embed”, and for "High Quality Embed" use the string &ap=%2526fmt%3D18. I'm totally new at this so tried those and am not even sure there's a difference when I put all 3 videos side by side. Mine is both high quality and HD.

I also learned that adding &autoplay=1 (not dissimilar to your code) does indeed work in making a video autoplay.

So, we have 2 goals left (IF SOMEONE ELSE COULD CHIP IN, as you were suggesting too):

1. Some little code to make the video FULL SCREEN
2. How to ensure it autoplays before anything else on the page loads/shows. Again I use your basic html and I've never put a video on any of my pages, much less tried to go full screen, autoplay and onload. It's the onload part I'm asking for this #2. Thanks for your solutions.

Thanks. I'll be watching.

Off topic a bit, but still interesting, wanna get your honest opinions/experiences on the following:

If you turn off commenting and rating and captioning by others (on youtube or any of the 30+ social bookmarking sites I plan to link to the video, do you "lose the benefit" of having a youtube video as far as Google SERP benefits? I'm always afraid people/competitors will just start voting you down and making negative comments to sabotage you. Thanks for your thoughts.

SevenCubed




msg:4225425
 2:41 pm on Nov 2, 2010 (gmt 0)

I would say it's a matter of your personal preference as to wether or not you want to allow those options. You are already obviously aware of the potential pitfalls.

As far as this...
do you "lose the benefit" of having a youtube video as far as Google SERP benefits

Don't allow yourself to be controlled by Google. Do what you think is best for yourself and your visitors.

donna130




msg:4225557
 6:06 pm on Nov 2, 2010 (gmt 0)

Great. Now that we have the autoplay figured out, these are our remaining goals:

1. Need a way to adjust the autoplay video to full screen
2. Find a way to automatically close that video when it hits the end and then do a TRANSITION (zoom out) to the page itself.

You might think of the video as figurative "curtains" opening to a "scene" where the scene is just a webpage with items.

But I'm struggling with doing this video as some "behavior" on load or, and if the video opens from within that window or opens a NEW window.

Thanks.

donna130




msg:4227857
 11:11 pm on Nov 7, 2010 (gmt 0)

Awaiting an answer, thanks.

travelin cat




msg:4228046
 2:59 pm on Nov 8, 2010 (gmt 0)

Find a way to automatically close that video when it hits the end and then do a TRANSITION (zoom out) to the page itself.

donna130, I'm not sure you could do this with just an embedded video. I'm thinking that you would need to either have somebody custom code this for you, or use either HTML5 or Flash.

donna130




msg:4228065
 4:00 pm on Nov 8, 2010 (gmt 0)

Sure. You know I've tried, on a recommendation elsewhere, "jw player", and it's a great open-source player (and the base code for youtube), but after investing all my time learning it perfectly, turns out they say that jw player can't accomplish that either. So, kindof a bummber, so, UNLESS SOMEONE ELSE(?) might be able to help me here with some code to do that, I may have to find a friend or something to custom code. I've got all the youtube script to script code, and the page is just your typical html page. So thanks and hope someone can help here to help me to "call the youtube video from the page itself, and then close that player at the end of the video to reveal the page itself." Video is basically already autorun and full screen. It's just a few seconds, but need it to show (& close) before any of the rest of the page shows.

Open to solutions, thanks again.

Robert Charlton




msg:4230252
 7:52 pm on Nov 14, 2010 (gmt 0)

autorun

FWIW, I think that autorun is generally a usability mistake.

You can't predict what the user's sound levels are going to be, and the laxness of web audio standards for "normal" or zero sound level compounds this problem.

Furthermore, you don't know where the user is going to be... eg, perhaps in a shared office situation where a blast of audio might be inappropriate.

Also, if user has chosen to open the page in another tab, how might this work in terms of autoplay?

I myself don't like autoplay, enough so that when a "regular" (non-video) site does this to me, unless I otherwise need the content, I quickly hit the exit button.

On YouTube or other video sites, of course, the context is different. There, I semi expect autoplay, though I still prefer to hit the play button myself.

donna130




msg:4241508
 5:39 am on Dec 12, 2010 (gmt 0)

Thanks. Well that's right, autorun isn't for everyone that's for sure. Setting aside sound level or privacy problems, which are not an issue for me. I remain open to discovering solution to ""call the youtube video from the page itself, and then close that player at the end of the video to reveal the page itself."

Perhaps others here may be able to help us solve this challenge.

Thanks again.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Web Video Creation and Optimization
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved