Streaming Video
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Streaming Video
Has anyone had any success streaming video from Youtube or a streaming server to an Iphone app? Is it a difficult task?
The Release notes for IOS have me totally confused. Do I use a rev player to steam a movie or do I uses iphoneControlCreate ? I get an error message that tells me it cannot find the handler.
How do I use these controls? Max
iphoneControlCreate "player", "ioscontrol"
iphoneControlSet "ioscontrol", "fullscreen", true
iphoneControlSet "ioscontrol", "preserveAspect", true
iphoneControlSet "ioscontrol", "showController", true
iphoneControlSet "ioscontrol", "a2"
--iphoneControlSet "ioscontrol", "filename", pathToYourMovieFile
iphoneControlDo "ioscontrol", "play"
The Release notes for IOS have me totally confused. Do I use a rev player to steam a movie or do I uses iphoneControlCreate ? I get an error message that tells me it cannot find the handler.
How do I use these controls? Max
iphoneControlCreate "player", "ioscontrol"
iphoneControlSet "ioscontrol", "fullscreen", true
iphoneControlSet "ioscontrol", "preserveAspect", true
iphoneControlSet "ioscontrol", "showController", true
iphoneControlSet "ioscontrol", "a2"
--iphoneControlSet "ioscontrol", "filename", pathToYourMovieFile
iphoneControlDo "ioscontrol", "play"
Re: Streaming Video
Do I use iphoneControlCreate "player", "ioscontrol" to create a player, or LiveCode's player tool?
Isn't there anyone who has used steaming video to an iphone app?
Max
Isn't there anyone who has used steaming video to an iphone app?
Max
Re: Streaming Video
Hi Max,
sorry for chiming in a bit late...
## I get an error message that tells me it cannot find the handler.
This is in the IDE, right?
Unfortuntaley the IDE does not recognize mobile specific handler/functions,
so you need to use an "if... then ..." structure:
And yes, you need to use iphoneControlCreate "player", "ioscontrol" to create a player on iOS.
The "player" object in LiveCode IDE only works for desktop apps.
Best
Klaus
sorry for chiming in a bit late...
## I get an error message that tells me it cannot find the handler.
This is in the IDE, right?
Unfortuntaley the IDE does not recognize mobile specific handler/functions,
so you need to use an "if... then ..." structure:
Code: Select all
...
if the environment = "mobile" then
iphoneControlCreate "player", "ioscontrol"
iphoneControlSet "ioscontrol", "fullscreen", true
...
...
The "player" object in LiveCode IDE only works for desktop apps.
Best
Klaus
Re: Streaming Video
Frustrated out of my mind with the limited documentation on how to play a video.
Thank you Claus for trying.
OK iphoneControlDo sets up a player, but does not plat the video.
THe play command plays the audio of the video, but displays nothing.
on mouseup
if the environment = "mobile"
then
iphoneControlCreate "player", "ioscontrol"
iphoneControlSet "ioscontrol", "fullscreen", true
iphoneControlDo "/Users/macbookpro/Desktop/Letters/The Letter A.mp4", "play"
end if
play "/Users/macbookpro/Desktop/Letters/The Letter A.mp4", "play"
end mouseup
Thank you Claus for trying.
OK iphoneControlDo sets up a player, but does not plat the video.
THe play command plays the audio of the video, but displays nothing.
on mouseup
if the environment = "mobile"
then
iphoneControlCreate "player", "ioscontrol"
iphoneControlSet "ioscontrol", "fullscreen", true
iphoneControlDo "/Users/macbookpro/Desktop/Letters/The Letter A.mp4", "play"
end if
play "/Users/macbookpro/Desktop/Letters/The Letter A.mp4", "play"
end mouseup
-
- Posts: 108
- Joined: Sun Aug 23, 2009 7:48 am
- Contact:
Re: Streaming Video
When using a player you need to test within the simulator or on a real device. If you try to use the play command on the desktop it will not play the video as it hasn't created any video player, and if you test in the simulator you can't reference files on you hard drive (/Users/Macbookpro...) due to the sandboxing model. To get the video's playing in the simulator you need to put it in the same folder as your app or a subfolder AND you also need to include that folder/file in the standalone.
If you wan't to build an app that works both on the desktop and on the iOS devices you can wrap your code in a command and then call that function to set up your player. On the desktop you can create a QuickTime player and on the iOS you create a "player" control.
Have you seen that there is a lesson about the subject? ( http://lessons.runrev.com/spaces/lesson ... een-in-iOS )
If you wan't to build an app that works both on the desktop and on the iOS devices you can wrap your code in a command and then call that function to set up your player. On the desktop you can create a QuickTime player and on the iOS you create a "player" control.
Have you seen that there is a lesson about the subject? ( http://lessons.runrev.com/spaces/lesson ... een-in-iOS )
maxs wrote:Frustrated out of my mind with the limited documentation on how to play a video.
Thank you Claus for trying.
OK iphoneControlDo sets up a player, but does not plat the video.
THe play command plays the audio of the video, but displays nothing.
on mouseup
if the environment = "mobile"
then
iphoneControlCreate "player", "ioscontrol"
iphoneControlSet "ioscontrol", "fullscreen", true
iphoneControlDo "/Users/macbookpro/Desktop/Letters/The Letter A.mp4", "play"
end if
play "/Users/macbookpro/Desktop/Letters/The Letter A.mp4", "play"
end mouseup
___________________________________
MacBook Pro, 15" 2.6GHz i7 Mac OS X 10.10.4
iMac 27", 3.2 GHz Quad i7, Mac OS 10.10.4
LiveCode 7.0.6 or 8.0dp4
MacBook Pro, 15" 2.6GHz i7 Mac OS X 10.10.4
iMac 27", 3.2 GHz Quad i7, Mac OS 10.10.4
LiveCode 7.0.6 or 8.0dp4
Re: Streaming Video
Hi max,
the docs are sparse, but correct nevertheless!
So taking a look there will not hurt!
You are mixing two syntaxes:
-> play "/Users/macbookpro/Desktop/Letters/The Letter A.mp4", "play" ???
(Check "play" in the dictionary!)
and missed the most important part:
...
iphoneControlSet "ioscontrol", "filename", "YOUR_LOCAL_OR_INTERNET_URL_HERE"
...
## And then finally:
iphoneControlDo "ioscontrol", "play"
...
You need to include the commands for the desktop version in the ELSE case!
Best
Klaus
the docs are sparse, but correct nevertheless!
So taking a look there will not hurt!
You are mixing two syntaxes:
-> play "/Users/macbookpro/Desktop/Letters/The Letter A.mp4", "play" ???
(Check "play" in the dictionary!)
and missed the most important part:
...
iphoneControlSet "ioscontrol", "filename", "YOUR_LOCAL_OR_INTERNET_URL_HERE"
...
## And then finally:
iphoneControlDo "ioscontrol", "play"
...
You need to include the commands for the desktop version in the ELSE case!
Code: Select all
on mouseup
if the environment = "mobile" then
iphoneControlCreate "player", "ioscontrol"
iphoneControlSet "ioscontrol", "filename", "/Users/macbookpro/Desktop/Letters/The Letter A.mp4"
iphoneControlSet "ioscontrol", "fullscreen", true
iphoneControlDo "ioscontrol","play"
## We are on the desktop:
ELSE
## play VIDEOCLIP "/Users/macbookpro/Desktop/Letters/The Letter A.mp4"
## This will NOT work on the desktop!
## "PLAY" is extrememyl picky with fileformats!
## You need to create a player object and set its filename accordingly like this:
set the filename of player "Your player here" to "/Users/macbookpro/Desktop/Letters/The Letter A.mp4"
## some more preparations for the movie display...
start player "Your player here"
end if
end mouseup
Klaus
Re: Streaming Video
Klaus and hliljegren ,
This is exactly what I needed. The lesson exmple really clarified it for me.
Also I see now where to put the file name.
Thank you, Max
This is exactly what I needed. The lesson exmple really clarified it for me.
Also I see now where to put the file name.
Thank you, Max
Still can't play video in ios
OK "I'm trying to stream this video: http://www.youtube.com/watch?v=FEzxchU4RUY
first I tried
iphoneControlSet "ioscontrol", "filename", "http://www.youtube.com/watch?v=FEzxchU4RUY"
then I tried
play "http://www.youtube.com/watch?v=FEzxchU4RUY"
Nothing worked: Looking at the release notes, it appears that this should work.
Video playback support
Basic support for playing videos has been added using a variant of the play command. A video file can be played by using:
play ( video-file | video-url ) The video will be played fullscreen, and the command will not return until it is complete, or the
user dismisses it.
If a path is specified it will be interpreted as a local file. If a url is specified, then it must be either an 'http', or 'https' url. In this case, the content will be streamed.
first I tried
iphoneControlSet "ioscontrol", "filename", "http://www.youtube.com/watch?v=FEzxchU4RUY"
then I tried
play "http://www.youtube.com/watch?v=FEzxchU4RUY"
Nothing worked: Looking at the release notes, it appears that this should work.
Video playback support
Basic support for playing videos has been added using a variant of the play command. A video file can be played by using:
play ( video-file | video-url ) The video will be played fullscreen, and the command will not return until it is complete, or the
user dismisses it.
If a path is specified it will be interpreted as a local file. If a url is specified, then it must be either an 'http', or 'https' url. In this case, the content will be streamed.
Re: Streaming Video
Hi Max,
1. this: "http://www.youtube.com/watch?v=FEzxchU4RUY" is just a HTML page
with the video embedded and not the URL of a video file that you could stream!
You need to supply the URL of the video file directly like:
"http://www.videoserver.com/videos/nice_one666.mp4"
2. The video on that page is in FLASH format and you know how Steve Jobs loves FLASH!
Maybe this video is also avaialble in MP4 format (playable on iOS) somewhere on the YouTube
server but I have no idea how you could find this out.
Best
Klaus
1. this: "http://www.youtube.com/watch?v=FEzxchU4RUY" is just a HTML page
with the video embedded and not the URL of a video file that you could stream!
You need to supply the URL of the video file directly like:
"http://www.videoserver.com/videos/nice_one666.mp4"
2. The video on that page is in FLASH format and you know how Steve Jobs loves FLASH!
Maybe this video is also avaialble in MP4 format (playable on iOS) somewhere on the YouTube
server but I have no idea how you could find this out.
Best
Klaus
Re: Streaming Video
I can't figure out how to get the url of a video. When I right click on it, it offers to copy the URL, but seems to return the HTML page. Anyways I just can't seem to load in any video, even from my onrev server, because I can't get the right address.
I was told I mistakenly put
just a HTML page with the video embedded and not the URL of a video file that you could stream!
I was told I mistakenly put
just a HTML page with the video embedded and not the URL of a video file that you could stream!
Re: Streaming Video
Hi Max,
well, YouTube also "camouflages" the video url, means the FLASH videoplayer may be loading some XML file which leads to the correct url.
What do you mean with you cannot load a video from your own server?
You know that iOS does not play FLASH content?
You will need a MP4 or another iOS compatible video format for streaming.
Best
Klaus
well, YouTube also "camouflages" the video url, means the FLASH videoplayer may be loading some XML file which leads to the correct url.
What do you mean with you cannot load a video from your own server?
You know that iOS does not play FLASH content?
You will need a MP4 or another iOS compatible video format for streaming.
Best
Klaus
Re: Streaming Video
I finally got the video from the server. It was tricky trying to find the correct address.
Thanks for the heads up about YouTube. I use it for Facebook videos, so I thought it would work. I'll just have to look for another non-flash streaming server.
Thanks, Max
Max
Thanks for the heads up about YouTube. I use it for Facebook videos, so I thought it would work. I'll just have to look for another non-flash streaming server.
Thanks, Max
Max
-
- Posts: 1
- Joined: Wed Jun 01, 2011 9:22 pm
Re: Streaming Video
Is there a way to detect when the video has finished playing?
Where can I find documentation for the properties of ioscontrol?
Where can I find documentation for the properties of ioscontrol?
Re: Streaming Video
Hi gweinfurther,
in LiveCode:
menu: "Help -> "iOS Release Notes"
Best
Klaus
in LiveCode:
menu: "Help -> "iOS Release Notes"
Best
Klaus
Re: Streaming Video
hliljegren wrote:
If you wan't to build an app that works both on the desktop and on the iOS devices you can wrap your code in a command and then call that function to set up your player. On the desktop you can create a QuickTime player and on the iOS you create a "player" control.
Have you seen that there is a lesson about the subject?
maxs wrote:Frustrated out of my mind with the limited documentation on how to play a video.
Thank you Claus for trying.
OK iphoneControlDo sets up a player, but does not plat the video.
THe play command plays the audio of the video, but displays nothing.
on mouseup
if the environment = "mobile"
then
iphoneControlCreate "player", "ioscontrol"
iphoneControlSet "ioscontrol", "fullscreen", true
iphoneControlDo "/Users/macbookpro/Desktop/Letters/The Letter A.mp4", "play"
end if
play "/Users/macbookpro/Desktop/Letters/The Letter A.mp4", "play"
end mouseup
Thanks for the link to the tutorial.. now that I have the video playing (sweet), how can I move the player window up higher on the screen?
I have been adjusting the:
Code: Select all
iphoneControlSet "ioscontrol", "rect", "0,200,320,500"
Thanks
- Jay