Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
Posts: 8
Registered: ‎11-17-2011
My Device: Blackberry Bold
My Carrier: Airtel

Problem in playing video..

Hi 

I am trying to play a video file into my app, but it is not working.

I refered to the document in https://bdsc.webapps.blackberry.com/html5/apis/HTMLVideoElement.html

I am using mp4 video format.

my video file is in remote server, i have also mentioned its path on config.xml,<access>tag

 

Pls help

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Problem in playing video..

Hello nero,

 

Just to narrow down where this is in fact an access permission issue or not, would it be possible to test this by downloading the video and loading it locally from your application?

 

I've previously used the following with success.

 

config.xml

<?xml version="1.0" encoding="utf-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.0.0">
	<name>Sandbox</name>
	<author>Oros</author>
	<content src="index.html"/>
</widget>

 

index.html

<!DOCTYPE html>
<html>
	<head>
		<!-- TODO -->
	</head>
	<body>
		<video width="560" height="340" controls>
			<source src="URL GOES HERE" type="video/mp4">
		</video>
	</body>
</html>

Erik Oros

BlackBerry Development Advisor


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
New Contributor
Posts: 8
Registered: ‎11-17-2011
My Device: Blackberry Bold
My Carrier: Airtel

Re: Problem in playing video..

Hi 

I tried this code..But this works fine if the video file is local .But my video file is in some remote server.I dont wont to download the file..

 

Pls reply 

Thanks

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Problem in playing video..

Hi nero,

 

This does sound like it may be an access issue then. Could you please post the contents of your config.xml file as well as confirm the full URL to the video you are attempting to link?

 

Erik Oros

BlackBerry Development Advisor


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
New Contributor
Posts: 8
Registered: ‎11-17-2011
My Device: Blackberry Bold
My Carrier: Airtel

Re: Problem in playing video..

This is my config.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.0.0" rim:header="RIM-Widget:rim/widget">
<name>Video</name>
<description>Video Demo</description>
<feature id="blackberry.ui.menu" required="true" version="1.0.0.0"/>
<content src="index.html"/>
<!--<rim:navigation mode="focus" />-->
<feature id="blackberry.app" required="true" version="1.0.0.0"/>
<feature id="blackberry.system.event" version="1.0.0"/>
<access uri="*" subdomains="true"/>
</widget>

 

Index.html

<!DOCTYPE html>
<html>
<body>
<video width="320" height="240" controls="controls">

<source src="http://s2.cpl.delvenetworks.com/media/9745f33c038f45a4b3556316d09b9887/53e082c599124bcdbf704b50e91c8..." type="video/mp4" />
<!--<source src="movie.ogg" type="video/ogg" />-->

</video>

</body>
</html>

 

 

pls help

Highlighted
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Problem in playing video..

Hello nero,

 

I've used the code you posted as-is (I had to copy the video URL and paste the full link into the app, but other than that no changes.)

 

I packaged the WebWorks application with your config.xml and index.html file though, and it worked just fine. Note that the video did not auto-play, but once I hit the play button it started as expected.

 

From your PlayBook, if you simply use the Browser to navigate to the video, can you please confirm whether that plays?

 

Erik Oros

BlackBerry Development Advisor


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.