1

I'm developing an video player for Windows Universal 10 (target version: 10.0.10240.0)

I'm able to launch files from PC to my app and play video as well as I want. The problem starts with I want when I launch a video, subtitle with the same name of video in the folder get it in application, for example I have these files in somewhere in my pc:

The.Originals.S03E14.480p.mkv

The.Originals.S03E14.480p.srt

I want when i Launched this mkv file, can access to srt file too. the code I used:

StorageFile file = args.Files[0] as StorageFile; // Launched file
string filePath = file.Path;
filePath = filePath.Replace(Path.GetExtension(filePath), ".srt");
StorageFile file2 = await StorageFile.GetFileFromPathAsync(filePath);

but for getting subtitle, it gives me ACCESS DENIED exception.

Is this possible to get subtitle without launching them?

thanks

Ramtin
  • 123
  • 2
  • 8
  • Have you added suitable *capabilities* and *file type associations*? – Romasz Feb 28 '16 at 10:18
  • Can you check if you change the target version to 10586 nad test it on 10586.107? I've [spotted similar problem](http://stackoverflow.com/q/33846675/2681948), but as I've now tested it seems to work on newest build. – Romasz Feb 28 '16 at 11:52
  • You have any solutions? – BorisT Aug 10 '16 at 15:04

1 Answers1

0

The short answer is no. The best solution would be to allow user specify SRT file manually via file picker. You can access only files which user has picked via picker. You can also access Video library folder (it should be specified in manifest permissions), but I assume you need to play file from any location. For more info take a look at the following link: https://stackoverflow.com/a/33083243/1099716 For example, even microsoft was unable to implement normal image viewer. Native windows 10 image viewer app can't navigate between pictures, since it can't access files in the same folder.

Community
  • 1
  • 1
Access Denied
  • 8,723
  • 4
  • 42
  • 72
  • Thanks for quick reply, But CCPLayer for wp 8.1 can do this! also FLV PLayer can too – Ramtin Feb 28 '16 at 10:37
  • I wonder how people do that, I also had such problem and gave up after several days of research. Maybe they use C++ code and bypassing security system. – Access Denied Feb 29 '16 at 04:04