videojs / video-js-swf

Custom Flash Player for VideoJS
http://videojs.com
Other
336 stars 312 forks source link

Cannot play flv files with cloudfront and signed urls #216

Closed jdc18 closed 7 years ago

jdc18 commented 7 years ago

Hi I am using amazon cloudfront and I am both using mp4s and flvs and I have no problem streaming mp4s

<source src="rtmp://xxxxx.cloudfront.com/cfx/st/&mp4:archivos/1007/cv1628841.mp4?Policy=eyJTdGETCETCETCETEC" type='rtmp/mp4'>

But with FLV is not working, this is what I am trying according to both amazon and videojs docs.

<source src="rtmp://xxxxx.cloudfront.com/cfx/st/archivos/1009/hobbit_vp6.flv?Policy=eyJTdGF0ETCETCETCETEC" type='rtmp/flv'>

When I do this I get failed to play stream and this error on console

VIDEOJS: ERROR: (CODE:0 MEDIA_ERR_CUSTOM) FLASH: NetStream.Failed t.D {message: video.js:23 VIDEOJS: ERROR: (CODE:0 MEDIA_ERR_CUSTOM) FLASH: Failed to play (stream ID: 1). t.D {message: "FLASH: Failed to play (stream ID: 1)."}

I tried adding &flv: or just &mp4: and while I get no error it doesnt stream anything.

jdc18 commented 7 years ago

Ok, so I didnt find any doc on this, but this worked like this

<source src="rtmp://xxxxx.cloudfront.com/cfx/st/&flv:archivos/1009/hobbit_vp6?Policy=eyJTdGF0ETCETCETCETEC" type='rtmp/flv'>

be sure to remove the ".flv" extension from you url