[Define]
URL1 "rtsp:\/\/vishnu.wipsl.com/StarWreck_256.3gp"

3G_AP "Internet"
EMULATOR_IAP "Ethernet with Daemon Dynamic IP"
[Enddefine]

[Test]
title Setup

create VCXTestUtilModule Util
// Copies some known 3G AP to "Internet" destination with "Internet" name for the AP.
Util CopyMethod "Internet" "Internet" "Internet"
// Disable connection dialog for "Internet" destination.
Util SetConnectionMethodIntAttribute "Internet" "Internet" 507 2 // 507 is ECmSeamlessnessLevel
delete Util

[Endtest]

[Test]
title Stream - OpenUrl
create FusionMpxPlayer_ApiTest test
test Create
pause 3000
test OpenUrl URL1 3G_AP
pause 30000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - SetVolume
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test SetVolume 10
pause 2000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - Play
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test Play
pause 4000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - PlayWithFadeIn
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test PlayWithFadeIn
pause 4000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - Pause
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test Play
pause 3000
test Pause
pause 2000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - Stop
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test Play
pause 3000
test Stop
pause 2000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - Pause and Play
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test Play
pause 3000
test Pause
pause 2000
test Play
pause 2000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - PlayPause
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test PlayPause
pause 3000
test PlayPause
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - Next
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test Next
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - Previous
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test Previous
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - Replay
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test Replay
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - StartSeekForward
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test Play
pause 3000
test StartSeekForward
pause 2000
test StopSeeking
pause 2000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - StartSeekBackward
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test Play
pause 3000
test StartSeekBackward
pause 2000
test StopSeeking
pause 2000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - General seek stress
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
loop 10
test StartSeekForward
pause 1500
test StartSeekBackward
pause 500
endloop
test StopSeeking
pause 2000
test ShutdownTester
delete test
[Endtest]


[Test]
title Stream - DecreaseVolume
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test SetVolume 20
pause 3000
test DecreaseVolume
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - IncreaseVolume
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test IncreaseVolume
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - MuteVolume
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test SetVolume 20
pause 2000
test MuteVolume
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - UnMuteVolume
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test SetVolume 20
pause 2000
test MuteVolume
pause 1000
test UnMuteVolume
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - SetVolume STRESS
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test SetVolume 1
pause 1000
test SetVolume 100
pause 1000
test SetVolume 20
pause 1000
test SetVolume 80
pause 1000
test SetVolume 40
pause 1000
test SetVolume 10
pause 1000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - Volume STRESS
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test Play
loop 12
print LOOP_COUNTER
test IncreaseVolume
test DecreaseVolume
endloop

test SetVolume 10

test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - Close
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test Close
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - ApplyEffect
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test ApplyEffect 2
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - DisableEffect
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test DisableEffect
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - ApplyEffect and DisableEffect
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test ApplyEffect 2
pause 2000
test DisableEffect
pause 2000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - PreservePosition
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test PreservePosition
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - PreserveState
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test PreserveState
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - CloseItem
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test CloseItem
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - CancelInit
create FusionMpxPlayer_ApiTest test
test Create
test SetCommandCompletionWait 0
test OpenUrl URL1 3G_AP
test CancelInit
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - CancelInit after init
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test CancelInit
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - ResetPreserveState
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 2000
test ResetPreserveState
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - UnloadNonActivePlugin
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 2000
test UnloadNonActivePlugin
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - ClearKeyBuffer
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 2000
test ClearKeyBuffer
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - VideoSeekForward
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test Play
pause 3000
test VideoSeekForward
pause 2000
test VideoEndSeek
pause 2000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - VideoSeekBackward
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test Play
pause 3000
test VideoSeekBackward
pause 2000
test VideoEndSeek
pause 2000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - VideoSeek STRESS
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 3000
test Play
pause 2000

loop 6

test VideoSeekForward
pause 2500
test VideoEndSeek

test VideoSeekBackward
pause 500
test VideoEndSeek

test Play
pause 2000

endloop

pause 2000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - VideoNaturalAspectRatio
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 1000
test Play
pause 3000
test VideoNaturalAspectRatio
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - VideoZoomAspectRatio
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 1000
test Play
pause 3000
test VideoZoomAspectRatio
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - VideoStretchAspectRatio
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 1000
test Play
pause 3000
test VideoStretchAspectRatio
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - VideoDefaultAspectRatio
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 1000
test Play
pause 3000
test VideoDefaultAspectRatio
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - Aspect Ratio STRESS
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 1000
test Play
pause 500

loop 5
print LOOP_COUNTER
test VideoNaturalAspectRatio
pause 200
test VideoZoomAspectRatio
pause 200
test VideoStretchAspectRatio
pause 200
endloop

test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - VideoHandleForeground
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 1000
test Play
pause 500

test VideoHandleForeground
pause 3000
test ShutdownTester
delete test
[Endtest]

[Test]
title Stream - VideoHandleBackground
create FusionMpxPlayer_ApiTest test
test Create
test OpenUrl URL1 3G_AP
pause 1000
test Play
pause 500

test VideoHandleBackground
pause 3000
test ShutdownTester
delete test
[Endtest]