# 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.

Contributor
Posts: 10
Registered: ‎12-17-2010
My Device: Not Specified

## Re: Play video in tablet simulator

i got my the file in bin-debug folder , I still dont understand why i can play cuepoints.flv for 4 secs if i use ns.play("http://ww.helpexamples.com/flash/video/cuepoints.flv") but i can not play any secs of that video if i use ns.play("C:/cuepoints.flv") (of course i have downloaded cuepoints in my local drive C) .

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

## Re: Play video in tablet simulator

bestinme22 wrote:

i got my the file in bin-debug folder , I still dont understand why i can play cuepoints.flv for 4 secs if i use ns.play("http://ww.helpexamples.com/flash/video/cuepoints.flv") but i can not play any secs of that video if i use ns.play("C:/cuepoints.flv") (of course i have downloaded cuepoints in my local drive C) .

Maybe it requires a URL with scheme "file:" instead of a native path.  Try this instead?

ns.play("file:///c:/cuepoints.flv")

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 439
Registered: ‎10-25-2010
My Device: Not Specified

## Re: Play video in tablet simulator

Obviously because the video is not at the location you're saying it is

The first link is to a web server, which the playbook can access over an HTTP connection and download. The 2nd link is to a specific folder on a harddrive, and obviously the video is not actually at C:/cuepoints.flv on the device.

You would need to include the FLV with your app when you bundle it up, (which doesn't make sense, as you app size will be gigantic) or somehow copy it over to the Simulator "Storage" and reference a valid simulator path.

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

## Re: Play video in tablet simulator

hey,

wat shawn stated is spot on. but ill re-iterate it. your playbook (simulator) and your computer have to very different storage media. which means they are two completely different systems and have two different set of "hard drives". so even if the simulator is running off your computer it does not have access to the same resources as your AIR Desktop. the folder structure is set up as /path/to/file and on windows its C:\path\to\file. so if you want to access anything on your playbook you have to some how import it there.

--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

## Re: Play video in tablet simulator

JRab wrote:  ... so even if the simulator is running off your computer it does not have access to the same resources as your AIR Desktop. the folder structure is set up as /path/to/file and on windows its C:\path\to\file. so if you want to access anything on your playbook you have to some how import it there.

Heh, and here I thought he was trying to run this on his desktop system.

Anyway, if you can get the file into your .bar file, then once it's installed you can access files in the application's folder using flash.filesystem.File.applicationDirectory, something like this:

import flash.filesystem.File;
...
ns.play(File.applicationDirectory.resolvePath('lastChristmas.flv').nativePath);


Now getting it into your .bar package is a different story.

If you were using the command line, you could just include it after your .swf file in the blackberry-packager command line.  That might look like this:

%AIRSDK%\blackberry-airpackager -package -target bar MyApp.bar application.xml MyApp.swf lastChristmas.flv

Using Flash Builder you'll have to know how to do the same thing from there (including data files, or whatever).  I haven't tried the trial version yet, but maybe somebody else can give you the details for that.

By the way, the .bar file is just a .zip file with a different file extension.  You can easily open it (renaming it to .zip first if that's the only way you know) to see what's packaged in it.  The File.applicationDirectory folder will point to the air/ subfolder in that package, so all resolved paths will be relative to that location.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Highlighted
Contributor
Posts: 10
Registered: ‎12-17-2010
My Device: Not Specified

## Re: Play video in tablet simulator

tks 4 all u guys . Finally i figure it out ! . Its really simple . lastChristmas.flv too large for simulator ! (14 mb)  thats all . When i try to use cuepoints.flv (1.1mb) . its work ! But i wonder why its just play for about 4 secs ? i have enable my graphic card in simulator . Any solution ?

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

## Re: Play video in tablet simulator

hey,

glad to hear you got it figured out. as for the limited play time, video is not fully supported on the playbook simulator at this point. so its going to be buggy most likely. which explains the unexpected stop of the video.