Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If video is muted then ads volume cant be unmuted #5125

Closed
meszmers opened this issue Mar 28, 2023 · 3 comments · Fixed by #5153
Closed

If video is muted then ads volume cant be unmuted #5125

meszmers opened this issue Mar 28, 2023 · 3 comments · Fixed by #5153
Assignees
Labels
component: ads The issue involves the Shaka Player ads API or the use of other ad SDKs status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@meszmers
Copy link

Have you read the FAQ and checked for duplicate open issues?
Yes

What version of Shaka Player are you using?
4.3.5

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from main?
Yes

Are you using the demo app or your own custom app?
Custom app

If custom app, can you reproduce the issue using our demo app?
It requires to load ads to check if it works.

What browser and OS are you using?
Windows/Chrome

What configuration are you using? What is the output of player.getConfiguration()?
{"drm":{"retryParameters":{"maxAttempts":2,"baseDelay":1000,"backoffFactor":2,"fuzzFactor":0.5,"timeout":30000,"stallTimeout":5000,"connectionTimeout":10000},"servers":{},"clearKeys":{},"advanced":{},"delayLicenseRequestUntilPlayed":false,"logLicenseExchange":false,"updateExpirationTime":1,"preferredKeySystems":[],"keySystemsMapping":{},"parseInbandPsshEnabled":false},"manifest":{"retryParameters":{"maxAttempts":2,"baseDelay":1000,"backoffFactor":2,"fuzzFactor":0.5,"timeout":30000,"stallTimeout":5000,"connectionTimeout":10000},"availabilityWindowOverride":null,"disableAudio":false,"disableVideo":false,"disableText":false,"disableThumbnails":false,"defaultPresentationDelay":0,"segmentRelativeVttTiming":false,"dash":{"clockSyncUri":"","ignoreDrmInfo":false,"disableXlinkProcessing":false,"xlinkFailGracefully":false,"ignoreMinBufferTime":false,"autoCorrectDrift":true,"initialSegmentLimit":1000,"ignoreSuggestedPresentationDelay":false,"ignoreEmptyAdaptationSet":false,"ignoreMaxSegmentDuration":false,"keySystemsByURI":{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},"sequenceMode":false},"hls":{"ignoreTextStreamFailures":false,"ignoreImageStreamFailures":false,"defaultAudioCodec":"mp4a.40.2","defaultVideoCodec":"avc1.42E01E","ignoreManifestProgramDateTime":false,"mediaPlaylistFullMimeType":"video/mp2t; codecs="avc1.42E01E, mp4a.40.2"","useSafariBehaviorForLive":true,"liveSegmentsDelay":3}},"streaming":{"retryParameters":{"maxAttempts":2,"baseDelay":1000,"backoffFactor":2,"fuzzFactor":0.5,"timeout":30000,"stallTimeout":5000,"connectionTimeout":10000},"rebufferingGoal":2,"bufferingGoal":10,"bufferBehind":30,"ignoreTextStreamFailures":false,"alwaysStreamText":false,"startAtSegmentBoundary":false,"gapDetectionThreshold":0.5,"durationBackoff":1,"forceTransmux":true,"safeSeekOffset":5,"stallEnabled":true,"stallThreshold":1,"stallSkip":0.1,"useNativeHlsOnSafari":true,"inaccurateManifestTolerance":2,"lowLatencyMode":false,"autoLowLatencyMode":false,"forceHTTPS":false,"preferNativeHls":false,"updateIntervalSeconds":1,"dispatchAllEmsgBoxes":false,"observeQualityChanges":false,"maxDisabledTime":30,"parsePrftBox":false},"mediaSource":{"sourceBufferExtraFeatures":""},"offline":{"usePersistentLicense":true,"numberOfParallelDownloads":5},"abr":{"enabled":true,"useNetworkInformation":true,"defaultBandwidthEstimate":1000000,"switchInterval":8,"bandwidthUpgradeTarget":0.85,"bandwidthDowngradeTarget":0.95,"restrictions":{"minWidth":0,"maxWidth":null,"minHeight":0,"maxHeight":null,"minPixels":0,"maxPixels":null,"minFrameRate":0,"maxFrameRate":null,"minBandwidth":0,"maxBandwidth":null},"advanced":{"minTotalBytes":128000,"minBytes":16000,"fastHalfLife":2,"slowHalfLife":5},"restrictToElementSize":false,"restrictToScreenSize":false,"ignoreDevicePixelRatio":false},"autoShowText":3,"preferredAudioLanguage":"","preferredTextLanguage":"","preferredVariantRole":"","preferredTextRole":"","preferredAudioChannelCount":2,"preferredVideoCodecs":[],"preferredAudioCodecs":[],"preferForcedSubs":false,"preferredDecodingAttributes":[],"restrictions":{"minWidth":0,"maxWidth":null,"minHeight":0,"maxHeight":null,"minPixels":0,"maxPixels":null,"minFrameRate":0,"maxFrameRate":null,"minBandwidth":0,"maxBandwidth":null},"playRangeStart":0,"playRangeEnd":null,"cmcd":{"enabled":false,"sessionId":"","contentId":"","useHeaders":false},"lcevc":{"enabled":false,"dynamicPerformanceScaling":true,"logLevel":0,"drawLogo":false}}

What did you do?
Mute video before the video starts and entered ad without sound. Tried to unmute the sound. (We dont have volume bar)

What did you expect to happen?
To be able to unmute/mute the ad with unmute button.

What actually happened?
On unmute button click, volume stays muted. (When entered with sound all works fine and when ad is finished sound is unmutable)

@meszmers meszmers added the type: bug Something isn't working correctly label Mar 28, 2023
@github-actions github-actions bot added this to the v4.4 milestone Mar 28, 2023
@Andekas
Copy link

Andekas commented Apr 12, 2023

It seems that the problem is in the setMuted() method ( https://shaka-player-demo.appspot.com/docs/api/lib_ads_client_side_ad.js.html#line199 )

If video starts muted, then this.volume_ is 0 and thus ad can't be unmuted.

@meszmers
Copy link
Author

Can this be made like this?
this.volume_ = this.getVolume() ?: 1;

@Andekas
Copy link

Andekas commented Apr 14, 2023

@avelad @joeyparrish Can you please take a look?

@theodab theodab self-assigned this Apr 14, 2023
theodab added a commit to theodab/shaka-player that referenced this issue Apr 14, 2023
Previously, we would set the starting volume of an ad to 0
if the main video is muted.
This had the problem that, because of how our custom mute/unmute
functionality on ads worked, that would lead to the "unmute" button
setting the ad to the "last volume" of 0.
This changes the ads manager to, instead, set the volume of the
ad to the volume of the video, and then call the mute function if
the ad is muted. That way, the ad will remember the previous volume
of the video, and will be able to unmute properly.

Closes shaka-project#5125
theodab added a commit to theodab/shaka-player that referenced this issue Apr 14, 2023
Previously, we would set the starting volume of an ad to 0
if the main video is muted.
This had the problem that, because of how our custom mute/unmute
functionality on ads worked, that would lead to the "unmute" button
setting the ad to the "last volume" of 0.
This changes the ads manager to, instead, set the volume of the
ad to the volume of the video, and then call the mute function if
the ad is muted. That way, the ad will remember the previous volume
of the video, and will be able to unmute properly.

Closes shaka-project#5125
@theodab theodab added the component: ads The issue involves the Shaka Player ads API or the use of other ad SDKs label Apr 14, 2023
theodab added a commit that referenced this issue Apr 14, 2023
Previously, we would set the starting volume of an ad to 0 if the main
video is muted.
This had the problem that, because of how our custom mute/unmute
functionality on ads worked, that would lead to the "unmute" button
setting the ad to the "last volume" of 0.
This changes the ads manager to, instead, set the volume of the ad to
the volume of the video, and then call the mute function if the ad is
muted. That way, the ad will remember the previous volume of the video,
and will be able to unmute properly.

Closes #5125
joeyparrish pushed a commit that referenced this issue Apr 26, 2023
Previously, we would set the starting volume of an ad to 0 if the main
video is muted.
This had the problem that, because of how our custom mute/unmute
functionality on ads worked, that would lead to the "unmute" button
setting the ad to the "last volume" of 0.
This changes the ads manager to, instead, set the volume of the ad to
the volume of the video, and then call the mute function if the ad is
muted. That way, the ad will remember the previous volume of the video,
and will be able to unmute properly.

Closes #5125
joeyparrish pushed a commit that referenced this issue Apr 26, 2023
Previously, we would set the starting volume of an ad to 0 if the main
video is muted.
This had the problem that, because of how our custom mute/unmute
functionality on ads worked, that would lead to the "unmute" button
setting the ad to the "last volume" of 0.
This changes the ads manager to, instead, set the volume of the ad to
the volume of the video, and then call the mute function if the ad is
muted. That way, the ad will remember the previous volume of the video,
and will be able to unmute properly.

Closes #5125
joeyparrish pushed a commit that referenced this issue Apr 26, 2023
Previously, we would set the starting volume of an ad to 0 if the main
video is muted.
This had the problem that, because of how our custom mute/unmute
functionality on ads worked, that would lead to the "unmute" button
setting the ad to the "last volume" of 0.
This changes the ads manager to, instead, set the volume of the ad to
the volume of the video, and then call the mute function if the ad is
muted. That way, the ad will remember the previous volume of the video,
and will be able to unmute properly.

Closes #5125
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jun 13, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: ads The issue involves the Shaka Player ads API or the use of other ad SDKs status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants