phawind111 / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

mediaHost.getQualityLevel is not called all the time. #703

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.play a movie and put a console log in mediaHost.getQualityLevel

What is the expected output? What do you see instead?
getQuality level should be called consistently

What version of the product are you using? On what operating system?
Android 

Please provide any additional information below.

I want  to  cap the minimum bit rate for smooth streaming.

so i am returning the selected bit rate in

mediaHost.getQualityLevel = function (streamIndex, qualityLevel) {
  return  selectedQuality.
}

but  i noticed few times  it is executing  this and some times it is not 
executing . is there any  way i can cap the minimum  bit rate all time ???

Original issue reported on code.google.com by kishores...@gmail.com on 10 Dec 2015 at 10:31

GoogleCodeExporter commented 8 years ago
Please provide further information:
1) Share receiver logs after reproducing the issue;
2) Share a sample stream;
3) What type of receiver are you using default, styled or custom?
4) Version of MPL 

Original comment by na...@google.com on 12 Dec 2015 at 1:25

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
1. attached receiver logs in which mediaHost.getQuality is not getting called.

2.
manifest file 
http://vod-singtelhawk.quickplay.com/ss/vol2/s/SingTelContentProvider/qpmezzhawk
digitalarrowyr031415calmthe3j51514115645episodeenglish20ltrt23976fps8017646/2015
-09-17/Singtel_MSSS_Presentation_HD/Singtel_MSSS_Presentation_HD.ism/manifest

license url
https://singtelhawk.quickplay.com/vstb/license.pr?b=616374696f6e3d3630327c7c6369
643d6369643a2346443936354542372d313236442d343931322d384233352d393231353536344637
33334240746573742e646f6d61696e&apiRevision=4&subscriberId=bff48543-69b7-4070-8ff
2-277a84500a67_1445606202744&providerId=26&uniqueId=c423a073071fd43b28f605a37650
412d&appVersion=1.0&deviceName=castClient&contentId=25948&apiVersion=5&delivery=
5&transactionId=21756760&appId=5006&licenseExpDatetime=1451007403210&carrierId=2
3

3. i am using custom receiver
4.mediaplayer - 
//www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js

Original comment by kishores...@gmail.com on 14 Dec 2015 at 8:57

Attachments:

GoogleCodeExporter commented 8 years ago
Based on provided information, this issue seems likely due to the 
implementation. Please refer the documentation for setting audio/video bitrate 
here: https://developers.google.com/cast/docs/player#set-videoaudio-bitrates. 

You could ask this question on Stack Overflow under Google Cast tag. Although, 
if you think this issue is with Cast SDK, please respond to this ticket with 
your complete implementation for quality level.

Original comment by na...@google.com on 16 Dec 2015 at 12:21

GoogleCodeExporter commented 8 years ago

Original comment by na...@google.com on 16 Dec 2015 at 1:04

GoogleCodeExporter commented 8 years ago
if (streamVideoBitrates && streamVideoBitrates.length > 0) {
                mediaHost['getQualityLevelOrig'] = mediaHost.getQualityLevel;
                mediaHost.getQualityLevel = function (streamIndex, qualityLevel) {
                console.log("comming here");
                    if (streamIndex == videoStreamIndex && streamVideoBitrates[qualityLevel] < 430000) {
                        var variantFound = false;
                        for (var i =qualityLevel; i < streamVideoBitrates.length; i++) {
                            if (streamVideoBitrates[i] > 430000) {
                                variantFound = true;
                                return i;
                            }
                        }
                        if (!variantFound){
                            return qualityLevel;
                        }
                    } else {
                        return qualityLevel;
                    }
                };
            }

Original comment by kishores...@gmail.com on 16 Dec 2015 at 2:07

GoogleCodeExporter commented 8 years ago
mediaManager.onLoad = function (event) {

if (streamVideoBitrates && streamVideoBitrates.length > 0) {
                mediaHost['getQualityLevelOrig'] = mediaHost.getQualityLevel;
                mediaHost.getQualityLevel = function (streamIndex, qualityLevel) {
                console.log("comming here");
                    if (streamIndex == videoStreamIndex && streamVideoBitrates[qualityLevel] < 430000) {
                        var variantFound = false;
                        for (var i =qualityLevel; i < streamVideoBitrates.length; i++) {
                            if (streamVideoBitrates[i] > 430000) {
                                variantFound = true;
                                return i;
                            }
                        }
                        if (!variantFound){
                            return qualityLevel;
                        }
                    } else {
                        return qualityLevel;
                    }
                };
            }

};

Original comment by kishores...@gmail.com on 16 Dec 2015 at 2:08

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
able to call the API now.

Original comment by kishores...@gmail.com on 21 Dec 2015 at 4:56