Swift Sample Project - Video Playback Not working

Hi,

I’ve been having a bit of difficulty getting the sample working.

The videos themselves upload correctly, as I can check in the backend. Unfortunately, trying to play the videos in-app consistently leads to issues. I’ve tried many combinations of filenames (ie /files/media/xx.mp4, removing .mp4 etc) but still having no luck.

Sample log attached (the textField content is “tony”)

----------------------- playbackControl ------------------------------------------------------
2016-02-28 22:31:09.291 VideoService[672:37880] MediaService -> playbackStream: options = <MediaPlaybackOptions: 0x156c9270>
2016-02-28 22:31:09.293 VideoService[672:37880] >>>>>>>>>>>>>>>>>> MediaPlaybackOptions -> getServerURL: rtmp://media.backendless.com:1935/mediaAppVod/definst
2016-02-28 22:31:09.293 VideoService[672:37880] MediaPlayer -> parameters:(
“12175C44-3AEE-25EE-FF13-5CF260E81000”,
v1,
“<null>”,
videoTube,
playRecorded
)
2016-02-28 22:31:09.295 VideoService[672:37913] MPMediaDecoder -> playing: try to open the stream rtmp://media.backendless.com:1935/mediaAppVod/definst/tony …
2016-02-28 22:31:09.295 VideoService[672:37913] MPMediaDecoder -> openStream: rtmp://media.backendless.com:1935/mediaAppVod/definst/tony

rtmp_buffer=0
rtmp_conn=S:12175C44-3AEE-25EE-FF13-5CF260E81000 S:v1 Z: S:videoTube S:playRecorded

[rtmp @ 0x156c2780] Unknown connect error (unsupported authentication method?)
[rtmp @ 0x156c2780] Server error: Connection failed: Application rejected connection.
2016-02-28 22:31:09.861 VideoService[672:37913] MPMediaDecoder -> avformat_open_input() (stream = ‘rtmp://media.backendless.com:1935/mediaAppVod/definst/tony’): -833925547 ‘Unknown error occurred’
2016-02-28 22:31:09.862 VideoService[672:37880] MediaPlayer <IMediaStreamEvent> connectFailedEvent: -833925547 = Unknown error occurred
2016-02-28 22:31:09.862 VideoService[672:37913] MPMediaDecoder -> playing: stream is not opened, wait about 1 sec
<IMediaStreamerDelegate> streamConnectFailed: -833925547 = Unknown error occurred
----------------------- stopMediaControl ------------------------------------------------------
2016-02-28 22:31:10.943 VideoService[672:37913] MPMediaDecoder -> playing: try to open the stream (null) …
2016-02-28 22:31:10.945 VideoService[672:37913] MPMediaDecoder -> openStream: unknown

rtmp_buffer=0
rtmp_conn=S:12175C44-3AEE-25EE-FF13-5CF260E81000 S:v1 Z: S:videoTube S:playRecorded

2016-02-28 22:31:10.947 VideoService[672:37913] MPMediaDecoder -> avformat_open_input() (stream = ‘(null)’): -816688904 ‘Protocol not found’

Hi Toby,

Our VideoService sample works without user authentication.

Please check the permissions for NotAuthenticatedUser role on your Backendless app dashboard:
http://support.backendless.com/public/temp/2bb94b9a44febbfef51a61f0d9afe61c.png</img>
If ‘Play recorded Audio & Video’ options is denied, you cannot playback your live streams and records for this user role.

Regard,
Slava

Ok, Toby, it looks like I’ve found the cause of problem - please see my comment in another thread:

http://support.backendless.com/t/problem-in-videoservice-sample-in-ios#comment-8937

Thanks for that fix!

It looks like that was the problem (rather than the permissions)

Thanks again!