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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

General Open Source Topics

Reply
Visitor
fatmagul
Posts: 1
Registered: ‎05-19-2012
My Carrier: aves

Youtube Application

Hi,

 

I am developing installed youtube application for Blackberry Handheld. I am developing this application with Webworks HTML5. I am compiling application with webworks and then I am running on Ripple. Videos is not playing on Ripple. And then I signing the application and this is running on Handheld. But the application is not playing some videos while application is playing some videos. What could be the reason for this? Can you help me? Config file and the application's main page as follows:

 

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="2.0"
    rim:header="RIM-Widget: rim/widget">

<author href="http://www.fatmagulergani.blogspot.com" rim:copyright="Copyright 2012 Comu">Comu</author>

<rim:navigation mode="focus" />

<name>Youtube</name>

<description>
    App of the youtube public watching videos site.
</description>

<rim:smileysurprised:rientation mode="auto"/>

<icon src="images/icon.png"/>
<icon src="images/icon.png" rim:hover="true"/>

<rim:cache maxCacheSizeTotal="2048" maxCacheSizeItem ="256" />

<content src="anaSayfa.html" >
    <rim:background src="listener.html" runOnStartup="true" />
</content>

<feature id="blackberry.ui.dialog"/>
<feature id="blackberry.ui.menu" />

<access uri="http://www.youtube.com" subdomains="true">
   <feature id="blackberry.app.event" required="true" version="1.0.0"/>
   <feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>

<rim:connection timeout="25000">
   <id>TCP_WIFI</id>
   <id>MDS</id>
   <id>BIS-B</id>
   <id>TCP_CELLULAR</id>
   <id>WAP2</id>
   <id>WAP</id>
</rim:connection>

<license>
   Example license
   Copyright (c) 2012 Comu.
   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
   BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
   ACTION OF CONTRACT, INSULT OR OTHERWISE, ARISING FROM, OUT OF OR IN
   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
   SOFTWARE.

</license>

</widget>

 

Main page: anaSayfa.html

<!DOCTYPE>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- page header -->
<title>My Videos</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<script type="text/javascript" src="swfobject.js"></script>
<link rel="stylesheet" href="jquery.mobile-1.1.0.min.css" />
<script src="jquery-1.7.2.min.js"></script>
<script src="jquery.mobile-1.1.0.min.js"></script>
<script type="text/javascript">
/* requests with ajax */
    $(function(){
        $.ajax({
            type: "GET",
            url: "http://gdata.youtube.com/feeds/api/standardfeeds/most_popular?time=today&alt=json-in-script&format=5",
            dataType:'jsonp',
            success: function(data){
                showMyVideos(data);
             },
       });
});

/* shows videos */
function showMyVideos(data) {
    var feed = data.feed;
    var entries = feed.entry || [];
    var html = ['<ul class="videos">'];
    for (var i = 0; i < entries.length; i++) {
        var entry = entries[i];
        var title = entry.title.$t.substr(0, 20);
        var thumbnailUrl = entries[i].media$group.media$thumbnail[0].url;
        var playerUrl = entries[i].media$group.media$content[0].url;
        var videoId = playerUrl.substr(playerUrl.indexOf('v/')+2, 11);
        playerUrl = "http://www.youtube.com/embed/" + videoId;
        html.push('<li onclick="$.youtube(\''+playerUrl+'\')"><img src='+thumbnailUrl+' width="130" height="100"/><span class="titlec" style="padding-left: 50px;">' +title+ '</span><span style="padding: 5px 0 0 0;"></span></li>');

    }
    html.push('</ul>');
    document.getElementById('videos').innerHTML = html.join('');
}
$.youtube = function(playerUrl){
    $("#oynat").fadeIn().find("span").html('<iframe width="100%" height="315" src=\''+playerUrl+'\' frameborder="0" allowfullscreen></iframe>');
}
</script>
</head>
<body>

<div id="youtube">
    <img src="images/icon.png">Youtube</img>
</div>

<!-- Player -->
<div id="oynat">

    <span></span>

</div>
<!--#Oynat -->
<div id="videoContainer">
    <div id="playerContainer">
        <div id="player">
        </div>
    </div>

    <div id="videos">
    </div>
</div>

</body>
</html>

Please use plain text.