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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


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

Re: To show any other url instead of my own url which I used to play the video in a html5 app for 7.0 OS mobiles

HI there, each time you re-package your application, you need to re-sign it. This can be done in Ripple by adding the following parameter to your bbwp command:

 

   -g signingpassword

 

So your current command:

 

    bbwp C:\Applications\YuppTV.zip -d -o C:\apps\packaged

 

Would become:

 

    bbwp C:\Applications\YuppTV.zip -g signingpassword -o C:\apps\packaged -d

 

Where you replace signingpassword with your own code signing password.


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

Re: To show any other url instead of my own url which I used to play the video in a html5 app for 7.0 OS mobiles

But happens to my original Blackberry webworks packager.

 

 

Again do I  need to use .csi and signaturetool.jar   to sign the app or just

 

 

    bbwp C:\Applications\YuppTV.zip -g signingpassword -o C:\apps\packaged -d

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

Re: To show any other url instead of my own url which I used to play the video in a html5 app for 7.0 OS mobiles

Just the bbwp command should do. The -g flag tells it to sign the package it creates.

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

Re: To show any other url instead of my own url which I used to play the video in a html5 app for 7.0 OS mobiles

Yes  oros after following you I have   typed  in the commandprompt  as said by you.

 

and the output is  

 

 

C:\Program Files\Research In Motion\BlackBerry WebWorks SDK 2.3.1.5>
bbwp bbwp C:\Applications\YuppTV.zip -g omsairam -o C:\apps\packaged -d
[INFO] Parsing command line options
[ERROR] Invalid command line parameters
bbwp version 2.3.1.5 Copyright(C) 2010-2011 Research In Motion
http://www.blackberry.com/developers/webworkssdk/

bbwp [drive:][path]archive [-s [dir]] [-g [password]] [-o dir]

archive Specifies the .zip file to compile
-s Save source. The default behaviour is to not save the so
urce files. If dir is specified then creates dir\src\ directory structure. If no
dir specified then the path of archive is assumed
-g Sign the .cod file after compilation using password. If
both -g and password are not present then the .cod will not be signed. If -g is
present and password is not, Signature Tool will prompt for entering password
-o Redirects output file location to dir (.cod, .alx, .jad)
. If both -o and dir are not specified then the path of archive is assumed
-v Turn on verbose messages
-d Enables Web Inspector on 7.0+ OS
-h Display this usage information

 

 

 

Here I have given my signing  passowrd

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

Re: To show any other url instead of my own url which I used to play the video in a html5 app for 7.0 OS mobiles

Hi there, the only issue I'm seeing is that bbwp appears twice:

bbwp bbwp C:\Applications\YuppTV.zip -g omsairam -o C:\apps\packaged -d

 

The rest of the parameters look fine.

 

 

I've also made a mistake. I don't know how I missed it, but just now I realized this is for BBOS 7.0. The target="_blank" approach is only for BB10; apologies as this was on oversight on my part.

 

In order to show a video in your application, without invoking the browser (as it will show the URL), you will need to make use of the <video> element:

http://www.html5rocks.com/en/tutorials/video/basics/

 

 

Note that this will be embedded within your HTML document. You can, however, override the behaviour of a <a> element as follows:

 

<a id="myvideo" href="http://www.domain.com/myvideo">

You would need to add a click event listener to it that returns false to prevent the default invocation:

 

<script type="text/javascript">
    document.querySelector('#myvideo').addEventListener('click', function () {
        /* Do anything else here. */
        return false;
    }, false);
</script>

 

Under the Do anything else here. section, you could perform a variety of actions:

1) Request Fullscreen Mode on your video and start playback with Javascript.

2) Navigate to your own, custom page that has the video embedded and sized to the dimensions of the screen.

3) Use CSS to show your video and size it to the dimensions of the screen.

 

The issue with simply navigating to the link (if it is an external link; i.e. YouTube, etc.) is that once you're there, since you're in a WebWorks application, you won't have a back button since there is no navigation / address bar, etc. in a WebWorks app. Ultimately you'll need to use the <video> tag. Requesting Fullscreen Mode will likely be the most straightforward.


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

Re: To show any other url instead of my own url which I used to play the video in a html5 app for 7.0 OS mobiles

Yes you are right Now Iam bale to sign the package enabling the  web inspector also.

 

 

 

what should I do now?

 

I have not followed the

 

http://www.html5rocks.com/en/tutorials/video/basics/

 

 

How to implement it in my code.

 

 

Can you please        impleement            the codes   as expected in my app

 

 

 

 

Note that this will be embedded within your HTML document. You can, however, override the behaviour of a <a> element as follows:

 

<a id="myvideo" href="http://www.domain.com/myvideo">

You would need to add a click event listener to it that returns false to prevent the default invocation:

 

<script type="text/javascript">
    document.querySelector('#myvideo').addEventListener('click', function () {
        /* Do anything else here. */
        return false;
    }, false);
</script>

 

 

Iam new to html and .js   . Please help me.      

 

 

Here video links  are  rtsp   streams and already parsed from the xml.aspx   in    .js

 

Ok  if Iam able to enable full screen also it is ok provided my target i.e hiding url or browser gets fulfilled.

 

 

 

 

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

Re: To show any other url instead of my own url which I used to play the video in a html5 app for 7.0 OS mobiles

[ Edited ]

EDIT: Added some custom HTML to make the code section scrollable.

 

Hi there,

 

I can't go through your application and make all the changes, but I've put together this sample of what I mean.

 

index.html

 

<!DOCTYPE html>
<html>
	<head>
		<title>Fullscreen</title>
	</head>
	<body>
		<a id="mylink" href="http://www.html5rocks.com/en/tutorials/video/basics/Chrome_ImF.webm">My Video</a>
		<script type="text/javascript">
			/* Keep track of the video that goes into fullscreen. */
			var whatsInFullScreen;

			/* When our page is ready, we start interacting with DOM elements. */
			window.addEventListener('DOMContentLoaded', function () {
				var mylink, href;

				/* This triggers when we go into or out of fullscreen mode. */
				document.addEventListener('webkitfullscreenchange', function (e, d, c) {
					if (document.webkitFullscreenElement) {
						/* If we have a fullscreen element, that means we entered fullscreen mode and we store the element. */
						whatsInFullScreen = document.webkitFullscreenElement;
					} else {
						/* Otherwise we've left fullscreen mode and we remove the element from the body. */
						document.body.removeChild(whatsInFullScreen);
					}
				}, false);

				/* Get the <a> element. */
				mylink = document.querySelector('#mylink');

				/* Save a copy of the href since we need to remove it. */
				href = mylink.href;

				/* Remove the href from the <a> element. */
				mylink.href = '#';

				/* Instead of invoking through href, we'll add a click listener. */
				mylink.addEventListener('click', function () {
					var video;

					/* Create a new video element. */
					video = document.createElement('video');
					
					/* Prevent the video from popping up in the DOM. */
					video.style.display = 'none';

					/* Set the src of the <video> to whatever the <a> href was. */
					video.src=href;

					/* We need to add the video to the body in order to go fullscreen. */
					document.body.appendChild(video);

					/* Go into fullscreen mode. */
					video.webkitRequestFullscreen();
				}, false);
			}, false);
		</script>
	</body>
</html>

 

Give this a shot in Chrome to see the behaviour. Basically, you create a <video> based on the href value of a link <a> element. Once the video is created, you set the style to display: none so that it doesn't pop up in the screen. And you then request fullscreen mode which will display the video in full dimensions.

 

This is one, small example. In your case, you would need to make these changes to a larger number of <a> elements.


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

Re: To show any other url instead of my own url which I used to play the video in a html5 app for 7.0 OS mobiles

Ok will upadte you      after implementing. Thanks       Oros