Log in or register to post comments

Video from External Source (URL)

January 7, 2013 - 9:44am #1

Hi

I am developing an IOS app using Vuforia SDK.  When an image is scanned, I need to display the video from an external source like our own server.  How will I do that?

Appreciate any help.

Thanks

Uthaman

 

 

Video from External Source (URL)

October 18, 2016 - 1:18pm #16

Hi you have to set this line like this: 

 

#ifdef EXAMPLE_CODE_REMOTE_FILE

        // With remote files, single tap starts playback using the native player

        if (ERROR != mediaState && NOT_READY != mediaState) {

            // Play the video

            NSLog(@"Playing video with native player");

            [videoPlayerHelper[touchedTarget] play:YES fromPosition:NO];

        }

#else

        // For the target the user touched

        if (ERROR != mediaState && NOT_READY != mediaState && PLAYING != mediaState) {

            // Play the video

            NSLog(@"Playing video with on-texture player");

             [videoPlayerHelper[touchedTarget] play:YES fromPosition:NO];

        }

#endif

Video from External Source (URL)

September 30, 2016 - 10:35am #15

Hi, I'm developing a cloud+video playback app with unity plug in and remote videos, everything works perfectly in Android but when I deploy it to iOS, the video doesn't play. Anyone has a solution or guide to achieve this feature?

Thanks

Video from External Source (URL)

April 1, 2016 - 7:02am #14

Hello ,

  Good day, I am developing android and iOS Ar App for play video url using unity  & vuforia. The project build success without any errors. But run time some issues occuered.

  In android the target found video is completely loaded but not playing automatically aslo autoplay option is enabled. Single tab on the screen the video started to play. At the same time lost the target and then second time target found the video play automatically.

 In iOS the target found video is ready to play state but not playing automatically aslo autoplay option is enabled. Single tab on the screen then the camera fully blacked.

  I am using unity 5.2 and vuforia latest sdk 5-5-9 video playback package and video playback prefab settings screen attached in this mail.

 Please help to solve this issues.

Video from External Source (URL)

May 29, 2013 - 2:41am #13

Great - glad you got it working.

 

N

Video from External Source (URL)

May 29, 2013 - 2:25am #12

Thanks once again, Now I can play video in both the ways.

Video from External Source (URL)

May 29, 2013 - 2:05am #11

Thanks N, its working when i go through the second way but when i put the code in #ifdef EXAMPLE_CODE_REMOTE_FILE macro then the contro does not comes inside the macro.

Video from External Source (URL)

May 28, 2013 - 6:27am #10

Please can you create a new thread rather than use an existing one - it simply causes confusion and delays.

 

Remote URL playback does work, albeit via full-screen only rather than a texture.

I was able to get this working with your sample file by a single change around line 134 of VideoPlaybackAppDelegate.mm after setting the EXAMPLE_CODE_REMOTE_FILE macro in EAGLView.mm where it is initially commented out:

 

#ifdef EXAMPLE_CODE_REMOTE_FILE

    // Load a remote file for playback

    for (int i = 0; i < NUM_VIDEO_TARGETS; ++i) {

        VideoPlayerHelper* player = [arView getVideoPlayerHelper:i];

//        [player load:@"http://<SOME_URL>" playImmediately:NO fromPosition:VIDEO_PLAYBACK_CURRENT_POSITION];

        [player load:@"http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT1211/sample_iTunes.mov" playImmediately:NO fromPosition:VIDEO_PLAYBACK_CURRENT_POSITION];

 

    

    }

#else

 

 

I was also able to get it to work without using the macro by changing the filename accordingly:

 

            default:

//                filename = @"VuforiaSizzleReel_2.m4v";

                filename = @"http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT1211/sample_iTunes.mov";

                break;

 

In this case you have to tap twice - once to play, and again to play it full screen.  You should be able to change this if you search the code.

 

HTH

 

N

 

Video from External Source (URL)

May 28, 2013 - 4:14am #9

Hi

I am developing an IOS app using Vuforia SDK. I want know that is it possible to play multiple videos from url. if yes, then how.please explain.

I am using the following code for it.but when i target an image it shows play icon and when i tap then it shows processing icon and takes 5min to process and comes to the play icon again.

for (int i = 0; i < NUM_VIDEO_TARGETS; ++i) {

        VideoPlayerHelper* player = [arView getVideoPlayerHelper:i];

       NSString* filename;

         switch (i) {

              case 0:

                  filename = @"http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT1211/sample_iTunes.mov";

                  break;

              case 1:

                  filename = @"http://www.steppublishers.com/sites/default/files/step.mov";

                  break;

              case 2:

                  filename = @" http://www.steppublishers.com/sites/default/files/stepteen2.mov";

                  break;

              default:

                  filename = @"http://www.steppublishers.com/sites/default/files/stepteen1.mov";

                  break;

         }

        if (NO == [player load:filename playImmediately:NO fromPosition:videoPlaybackTime[i]]) {

                   NSLog(@"Failed to load media");

            }

 

        if (NO == [player load: filename playImmediately:NO fromPosition:videoPlaybackTime[i]]) {

            NSLog(@"Failed to load media");

        }

   }

 

Appreciate any help.

Thanks

Dipesh

Video from External Source (URL)

March 29, 2013 - 1:33am #8

Thanks NalinS.

Video from External Source (URL)

March 28, 2013 - 3:39am #7

First of all, please create a new topic rather than re-use an existing one.

Second, please try to be more clear:

 it's working properly when i use local storage but not working for URL

...you need to provide more detail than "it's not working" - i.e. what have you tried, what have you investigated, what does it show?

Also try searching the forums as well.

 

Essentially the playback sample code is just a sample.  It uses the underlying iOS player to play videos which means that local files can be played either on a texture or full screen.  However remote files will only ever be played on screen.

The player is not designed to handle URLs (e.g. Youtube).  Instead it is meant to handle video files, so chances are if you point it at a remote video file rather than a URL then it should work.

 

HTH

 

Video from External Source (URL)

March 27, 2013 - 9:49pm #6

 

Hi

I am developing an IOS app using Vuforia SDK.  When an image is scanned, I need to display the video from an external source like our own server.  it's working properly when i use local storage but not working for URL( i am using the video play back sample code ),How will I do that?

Appreciate any help.

Thanks

Dipesh

Video from External Source (URL)

February 15, 2013 - 2:52am #5

where to store it in Application Documents/Library/tmp folder

The path to use is as below:

NSString *fullPath = [NSStringstringWithFormat:@"%@/Documents/%@",NSHomeDirectory(),dataSetPath];

 

May i know what's the reason URL (remote) videos not play on texture in IOS explain in detail.

The video playback sample simply uses the underlying iOS movie player, and this is how it handles remote files i.e. Full Screen, possibly because it may be able to provide a better user experience due to network issues.  The sample demonstrated the key objective i.e. how Vuforia can enable movie playback and remote playback on a texture was outside the scope.  The dev team has other priorities ;)

 

This is the only way to play url video on texture or any other solution? guide me with other posibilities will have

It seems you have two options:

1 - Download to the documents directory and then play on a texture

2 - Try to write / use specific code to play on a texture.  The link below shows how it may be possible as a developer has provided some sample code.

https://developer.vuforia.com/forum/ios/play-remote-video-image-use-calayer-sample-code

 

N

 

 

Video from External Source (URL)

February 15, 2013 - 2:17am #4

Thanks for your response and your explanation! 

 I If I want to play on texture will need to download the video from URL and where to store it in Application Documents/Library/tmp folder because Apple will reject application not following iOS Data Storage guideline.

This is the only way to play url video on texture or any other solution? guide me with other posibilities will have.

I checked some other forum link says android have to play url video on texture , May i know what's the reason URL (remote) videos not play on texture in IOS explain in detail.

 

Check below link Alexandro said it is possible for android:-

https://developer.vuforia.com/forum/issues-and-bugs/it-possible-stream-video-url-video-playback-example

 

Thanks,

P.Uthaman

 

 

 

https://developer.vuforia.com

January 10, 2013 - 3:44am #3

If you want to use the code

January 8, 2013 - 8:56am #2

If you want to use the code in the video playback sample, if it plays from a URL it will play full screen using the iOS native video player - it will not play on a texture.

If you want it to play on a texture, then you will need to download the video from the URL and store it in the iOS documents directory, and then it should work.

N

Log in or register to post comments