NimbleKit - fast iOS app development

NKVideoPlayer Not Play

Problem discussions

NKVideoPlayer Not Play

Postby hazard » Fri Jun 08, 2012 4:25 am

Code: Select all
<html>
    <head>
        <meta name = "viewport" content = "initial-scale = 1.0, user-scalable = no" />
        <link rel="stylesheet" href="style.css" type="text/css">
            </head>
   
    <body>
        <script type="text/javascript" src="NKit.js"></script>
       
        <script>
             
            var navController = new NKNavigationController();
            navController.setTitle("MV VDO");
            navController.setTintColor(0, 0, 0);
             var file = NKGetParameter("file" );
            var vdo = NKVideoPlayer();
                       
            vdo.openFileName("YZ7qR.mp4");
            NKLog("play");
            vdo.play();
           
           
           
           
            </script>
               
    </body>
   
   
   
   
   
</html>


I Cannot Play video On function i try Log NKLOG() After .openfilename thene don't show log
9hazard

Macbook pro
xcode 4.2

i special coding php , mysql , mongoDB , memcache , redis
OS Linux , MacOS
hazard
 
Posts: 6
Joined: Sat Jan 07, 2012 3:14 am

Re: NKVideoPlayer Not Play

Postby myhes » Fri Jun 08, 2012 10:08 am

This should work. The only issue I have with this code is large videos tend to lag/freeze.

Code: Select all
<script>
function play_vdo(){
                var vdo;
                vdo = new NKVideoPlayer();
                vdo.openFileName("YZ7qR.mp4");
                vdo.play();
            }
</script>

<body>
<a href="#" onClick="play_vdo()">Example</a>
</body>


-Matt
User avatar
myhes
 
Posts: 15
Joined: Fri May 20, 2011 5:12 am
Location: Clinton, OH


Return to Troubleshooting

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest