+1
Fixed

Auto play video

brandon sloan 12 years ago updated by icahill (Administrator) 12 years ago 14
I'm auto playing a video in a wire and a black box flashes before the video plays. I removed a background color but the flash keeps happening. Is there a way to pre-load a video or somehow remove the blink?
Brandon,

nice to see you trying out the video tag. Can you give me a little more context into the problem? Is this video hosted in your Wire or through a URL? Are you using the seekto attribute?
Thanks for the reply....
I'm using a url to link to the video. Seekto works but it still flashes a black box before the video starts. Here is my code.



<panel name="vid" alias="VID" ypos="200" xpos="100" height="525" width="792" >
<video name="video" alias="VIDEO" height="100%" width="100%" controls="no" scalingmode="yes" loop="no" onstop="layer1" transparent="yes" seekto=".1"></video>
</panel>
<panel name="clickpanel" alias="CLICKPANEL" align="center" ypos="105" height="75%" width="75%" onclick="playVid2" alpha="1">
</panel>
<panel name="vid2" alias="VID2" ypos="200" xpos="100" height="525" width="792" alpha="0">
<video name="video2" alias="VIDEO2" height="100%" width="100%" controls="no" scalingmode="yes" loop="no" onstop="fadebullets" transparent="yes" seekto=".1"></video>
</panel>
<!--VIDEO-->
<action name="playVid" oninit="yes">
<vidcontrol type="play" file="videos/mol_part1.mp4" target="VIDEO" />
</action>
<action name="layer1">
<!--Click to change video-->
</action>
<action name="playVid2">
<alpha value="0" time="0" target="VID"/>
<alpha value="0" time="0" target="CLICKPANEL"/>
<alpha value="1" time="0" target="VID2"/>
<vidcontrol type="play" file="videos/mol_page2.mp4" target="VIDEO2" />
</action>


Thanks for the help.
This code has video files, not URLs? Did you change it for the example?

Also you will need to add seekto on the videocontrol tag and not the video tag.
Sorry miscommunication...the video file are located with the app. So this is a direct link to the video. I tried playing around with seekto on both areas, I just left it on those tags. Do you think this will help?
Maybe. I would move the seekto onto the actions and give it a lerger number to see if that removes the black. That will give us a good place to start.

Also, do you know the framerate and encoding on your videos? Sometimes Apple doesn't seekto certain types correctly. That could be the issue as well?
Sorry for the delay...Several projects.

The video has a 1 second flash of a black screen before playing and does the same thing with an onclick. The video plays well throughout. I tried to seekto, but every time it starts playing I get the flash. Any help would be greatly appreciated.
Could you let me know the framerate and encoding on your video?
The video is mp4. 23.98 fps
Would it be possible for you to email me the video content you are using or add me to your project as a collaborator? use icahill@rarewire.com
I shortened your code to contain a single video tag to look like the the code below. Unfortunately, with the same results. I am escalating this issue and will hopefully have an answer soon.

Thanks.



<wire>
<main>
<panel name="vid" alias="VID" ypos="200" xpos="100" height="525" width="792">
<video name="video-player" alias="VIDEO" height="100%" width="100%" controls="no" scalingmode="yes" loop="no" ></video>
<panel name="clickpanel" alias="CLICKPANEL" height="100%" width="100%" onclick="playVid2"></panel>
</panel>
</main>
<actions>
<action name="playVid" oninit="yes">
<vidcontrol type="play" file="mol_part1.mp4" target="VIDEO" />
</action>
<action name="playVid2" >
<vidcontrol type="play" file="mol_page2.mp4" target="VIDEO" />
<set target="CLICKPANEL" onclick="fadebullets" />
</action>
</actions>
</wire>
</pre>
Brandon,

After talking with development about this issue, it isn't sure we can improve on this and avoid the flicker. Apple's video player does not allow us to run two videos back to back like this.

What I might suggest to achieve this scenario is to make a static image of the last frame of your first video and alpha it up and the video down when it is done playing. Then you should be able to alpha up the second video over the image without a flicker.
I added the code and it looks good.

Thanks for the help!