Media Player with external videos

  • d
  • h
  • m
  • s

Joseph Caristena

Hi,
Is it possible to use the Media Player with external videos on a web site ?

I am using the following script and it works properly.

NewArray "[VideoSources]"
ArrayPush "[VideoSources]" "app/files/a.mp4"
ArrayPush "[VideoSources]" "app/files/b.mp4"
ArrayPush "[VideoSources]" "app/files/c.mp4"

SetVar "[CurrentVideoIndex]" "0" "Number"
ArrayLength "[VideoSources]" "[TotalVideoSources]"

ArrayGetItem "[VideoSources]" "[CurrentVideoIndex]" "[CurrentVideoPath]"
MediaSetSource "MediaPlayer1" "" "[CurrentVideoPath]" "" ""

But can I use something like this ?

NewArray "[VideoSources]"
ArrayPush "[VideoSources]" "www.egovmetrics.com/AppMobilePlatform/Video/a.mp4"
ArrayPush "[VideoSources]" "www.egovmetrics.com/AppMobilePlatform/Video/b.mp4"
ArrayPush "[VideoSources]" "www.egovmetrics.com/AppMobilePlatform/Video/c.mp4"

SetVar "[CurrentVideoIndex]" "0" "Number"
ArrayLength "[VideoSources]" "[TotalVideoSources]"

ArrayGetItem "[VideoSources]" "[CurrentVideoIndex]" "[CurrentVideoPath]"
MediaSetSource "MediaPlayer1" "" "[CurrentVideoPath]" "" ""

It can be useful to handle the media content on a web site.

Thanks
Best
Joseph Caristena


decsoft

Hello,

There is no problem to use absolute URLs, in fact this is the recommended way, since we can't reproduce local files in platforms like Android. If you have problems using absolute URLs, try to start the URLs by the "http://www." instead "www.".



Joseph Caristena

Hi,
I am using absolute URLs now.
But something strange is happening.
I hear the audio, but I do not see the video.
Why ?

Thanks
Best
Joseph Caristena


decsoft

Hello,

Probably a "codec" related problem Joseph... for that reason we need to provide as much sources as possible: to let the browser to choose the more appropiate/suitable source to be reproduced. Honestly I don't think this is a problem of AB nor the media player control, but the video/browser itself... are you tried the video in various browsers? Are the results the same?



Joseph Caristena

Hi,
You are right;)
Now it is working.

Thanks
Joseph Caristena

Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.