only autoplay videos
This commit is contained in:
parent
2eb822b33e
commit
d5e44d71f1
1 changed files with 12 additions and 1 deletions
|
@ -94,6 +94,11 @@ export const makeSelectNextUnplayedRecommended = (uri: string) =>
|
||||||
// Make sure we don't autoplay paid content, channels, or content from blocked channels
|
// Make sure we don't autoplay paid content, channels, or content from blocked channels
|
||||||
for (let i = 0; i < recommendedForUri.length; i++) {
|
for (let i = 0; i < recommendedForUri.length; i++) {
|
||||||
const recommendedUri = recommendedForUri[i];
|
const recommendedUri = recommendedForUri[i];
|
||||||
|
const claim = claimsByUri[recommendedUri];
|
||||||
|
|
||||||
|
if (!claim) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
const { isChannel } = parseURI(recommendedUri);
|
const { isChannel } = parseURI(recommendedUri);
|
||||||
if (isChannel) {
|
if (isChannel) {
|
||||||
|
@ -105,7 +110,13 @@ export const makeSelectNextUnplayedRecommended = (uri: string) =>
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const claim = claimsByUri[recommendedUri];
|
// We already check if it's a channel above
|
||||||
|
// $FlowFixMe
|
||||||
|
const isVideo = claim.value && claim.value.stream_type === 'video';
|
||||||
|
if (!isVideo) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
const channel = claim && claim.signing_channel;
|
const channel = claim && claim.signing_channel;
|
||||||
if (channel && blockedChannels.some(blockedUri => blockedUri === channel.permanent_url)) {
|
if (channel && blockedChannels.some(blockedUri => blockedUri === channel.permanent_url)) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Reference in a new issue