Live Streaming not working on Opera.

zohaan

New Member
Opera does not support H.264 codec (default installation).
So for opera I have to change playback codec either in JavaScript or server-side for all server.
if i wish to change playback codec in JavaScript then which file i should change ?
if i wish to change server-side what changes i should do ?
Thanks in Advance.
 

Max

Administrator
Staff member
Client-side
Here you remove H.264 video codec.
Code:
session.createStream({name:'stream22', stripCodecs:['H264','h264']}).play();
Note, you have to remove H.264 for Opera only and check if browser is Opera.
Server-side
Code:
codecs=opus,alaw,ulaw,g729,speex16,g722,mpeg4-generic,telephone-event,vp8,h264,flv,mpv
Here you can set VP8 codec priority as a global setting for all connections.
 

zohaan

New Member
i can not find this line options.stripCodecs=['H264','h264'];

Max here is code where should i remove this H264 codec.

Code:
stream = session.createStream(options).on(STREAM_STATUS.PLAYING, function(stream) {
        document.getElementById(stream.id()).addEventListener('resize', function(event){
            var streamResolution = stream.videoResolution();
            if (Object.keys(streamResolution).length === 0) {
                resizeVideo(event.target);
            } else {
                // Change aspect ratio to prevent video stretching
                var ratio = streamResolution.width / streamResolution.height;
                var newHeight = Math.floor(options.playWidth / ratio);
                resizeVideo(event.target, options.playWidth, newHeight);
            }
        });
        setStatus(stream.status());
        onStarted(stream);
    }).on(STREAM_STATUS.STOPPED, function() {
        setStatus(STREAM_STATUS.STOPPED);
        onStopped();
    }).on(STREAM_STATUS.FAILED, function() {
        setStatus(STREAM_STATUS.FAILED);
        onStopped();
    }).on(STREAM_STATUS.NOT_ENOUGH_BANDWIDTH, function(stream){
        console.log("Not enough bandwidth, consider using lower video resolution or bitrate. Bandwidth " + (Math.round(stream.getNetworkBandwidth() / 1000)) + " bitrate " + (Math.round(stream.getRemoteBitrate() / 1000)));
    });
    stream.play();
 

Max

Administrator
Staff member
You have to add
Code:
options.stripCodecs=['H264','h264'];
This line removes H.264 codec
 
Top