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
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: To show any image instead of browser and play the video directly after few secs.

or else explain me the image Tag concept

 

 

My image url will be like this   "http://www.yupptv.com/img/i/ndtvindia.png"

 

 

How to code that in such way that  " I   set the poster attribute to be an image URL which will be displayed until the video starts."

 

 

shall I send my .js code once again

 

I am playing the video with mwl concept default media player

 

str += "<div class='ui-list-item'>"+ "link: " + "<a href=\""+ channel['link']+"\">Start video</a> </div>";

 

 

Here link is rtsp link/stream

 

 

Please use plain text.
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: To show any image instead of browser and play the video directly after few secs.

Yes I have built and packaged the application and I got the output but my query is different .   I have mailed u that too.

 

 

HelloWorld

 

 

 

etc

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 816
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: To show any image instead of browser and play the video directly after few secs.

For BBOS 7 you would need to use a different SDK, but the principals are the same:

https://developer.blackberry.com/html5/documentation/getting_started_with_webworks_for_bb_os.html

 

 

The code I'm suggesting you use would be similar to this:

 

<html>
<head>
</head>
<BODY>
	<video id='video1' 
	src='rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov' 
	poster='http://www.yupptv.com/img/i/ndtvindia.png' controls></video>
</BODY>
</html>

 I just used a sample rtsp stream and your poster image that you published above.

Tim Windsor
Application Development Advisor II
Please use plain text.
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: To show any image instead of browser and play the video directly after few secs.

Hi     twindsor   my index.html  is in this way

 

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>YuppTV</title>
<link href="s40-theme/css/s40-theme.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="js/jquery-latest.pack.js"></script>
<script language="javascript" type="text/javascript" src="s40-theme/js/screensize.js"></script>
<script language="javascript" type="text/javascript" src="js/main.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="mwl-2.0.js"></script>
<script type="text/javascript" >
$(document).ready(function() {
$(".tab_one").click(function (e) {
e.preventDefault();
$(".tab_one").addClass("selected").not(this).removeClass("selected");
});
});
</script>

</head>
<body onload="xmlDataSource.init();">
<div class="ui-page">
<!-- header -->
<div class="ui-header" id='test'>
<table class="header_table" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="header_table_td_height"><div class='ui-title'><img src="logo.png" width="200" height="60"></div></td>
</tr>
<tr>
<td class="header_table_td_height" ><div class='ui_text_show' id="headertext" style="display: block;">Please select your desired Language. </div></td>
</tr>
</table>
</div>
<div class="ui-content" >
<div id="tabs" style="display:none;">
<table>
<tr>
<td width="33%"><div onclick="LoadParser('2g');" class="tab_one selected">2G : Low</div></td>
<td width="33%"><div onclick="LoadParser('3g');" class="tab_one">3G : MEDIUM</div></td>
<td width="34%"><div onclick="LoadParser('wifi');" class="tab_one">WIFI : HIGH</div></td>
</tr>
</table>
<!--<ul>
<li><div onclick="bandtype='Low';test_fn('2g');" class="">2G : Low</div></li>
<li><div onclick="bandtype='Medium';test_fn('3g');">3G : MEDIUM</div></li>
<li><div onclick="bandtype='High';test_fn('wifi');">WIFI : HIGH</div></li>
</ul>-->
</div>

</div><div class="ui-category-list" id="accordian" >

</div>
</div>

<div id="back" onclick="xmlDataSource.init();hideTab();">
<span class='back_btn'>Back</span>
</div>
</body>
</html>

 

 

 

 

All links, images and the channel video urls are laready parsed in the .js code.

 

 

 

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 816
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: To show any image instead of browser and play the video directly after few secs.

I don't understand. Do you have what you need now? If you use code like the example I gave in your code, you should be completely setup to do this.

Tim Windsor
Application Development Advisor II
Please use plain text.
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: To show any image instead of browser and play the video directly after few secs.

But  here in my case  all rtsp streams/links are already parsed from the file xml.aspx in main.js.

 

 

How about implemenation  of  poster tags /image tags here  then ?  

 

 

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 816
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: To show any image instead of browser and play the video directly after few secs.

You can set the src attribute of a Video tag using JavaScript, as well as the poster attribute. 

 

So, if you have 3 buttons to choose the stream quality, you could go as far as creating a Video element, with the appropriate src and poster attributes and inserting it into the page with controls, and even start playing.

 

Or, just have a video element in the page already and use the buttons to change the stream.

Tim Windsor
Application Development Advisor II
Please use plain text.
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: To show any image instead of browser and play the video directly after few secs.

Ok let me try   Can u be little brief on that   as my links  , images aare already parsed  in .js .

Please use plain text.
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: To show any image instead of browser and play the video directly after few secs.

Yes twindsor I have used  the code    

 

 

<html>
<head>
</head>
<BODY>
	<video id='video1' 
	src='rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov' 
	poster='http://www.yupptv.com/img/i/ndtvindia.png' controls></video>
</BODY>
</html>


But with this implementation . When my app is clicked on then the video is starting at the start of the app and then continuing to my app.


But I want I want the a image to dispalyed for few secs imediately after the channel image is cicked i.e before the video starts.


Please implemnt in such a way.My main motive is to hide the browser page or atleast only the url or addressbar itself.




Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 816
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: To show any image instead of browser and play the video directly after few secs.

I can't implement your app for you. I am providing sample code that you can use to base your own implementation on. The example I gave shows how to use the video tag with poster and src attributes. Now it's up to you to include it in your application in the way that you want it to appear.

Tim Windsor
Application Development Advisor II
Please use plain text.