native.newVideo Problem (SOLVED)

Im using native.newVideo API to play video intro for my game. But the video is played in black screen

Here is the code. Am I doing something wrong ?

local video = native.newVideo( 0, 0, 480, 320 )   
  
-- load a video   
video:load( "intro.m4v", system.DocumentsDirectory )  
--video:seek( 0 )  
  
video:play()  
  
local function stopVideo()  
video = nil  
game.changeScene("mainscene")  
end  
  
timer.performWithDelay(6000, stopVideo, 1)  

[import]uid: 11559 topic_id: 23277 reply_id: 323277[/import]

  1. You have to test on device. This will not work in the simulator.
  2. I had this problem and it turned out that the video was off the screen. If you can hear sound, then you might want to center the video based on the pivot point being the center of the video (stageWidth / 2, stageHeight / 2)
  3. Make sure the path of your file is correct, you have set the path of the file to be in the system Documents Directory. If it is not in there it will not find the file, you can also define folders such as “videos/” and place your videos in a video file.

Hope that helps… I just went through the whole newVideo thing for cinematics in my game… [import]uid: 63800 topic_id: 23277 reply_id: 93154[/import]

Thanks. Can you make an example out of my code to place video into video folder and start it.

Please. Thanks [import]uid: 11559 topic_id: 23277 reply_id: 93156[/import]