Recsys: add isEmbed
to videos in Markdown (posts, comments) (#1765)
* Remove dead-end selector `playingUri` resides in the `content` slice, so this returns nothing. Nobody is using it, so should be safe to remove. * Recsys: add `isEmbed` to videos in Markdown (posts, comments) It seems like the existing `embedded` needs to specifically mean `/$/embed` (external from odysee.com), so had to add another variable.
This commit is contained in:
parent
0a88c6254d
commit
d3f95e256a
3 changed files with 6 additions and 5 deletions
|
@ -82,7 +82,8 @@ type Props = {
|
||||||
claimId: ?string,
|
claimId: ?string,
|
||||||
title: ?string,
|
title: ?string,
|
||||||
channelTitle: string,
|
channelTitle: string,
|
||||||
embedded: boolean,
|
embedded: boolean, // `/$/embed`
|
||||||
|
embeddedInternal: boolean, // Markdown (Posts and Comments)
|
||||||
internalFeatureEnabled: ?boolean,
|
internalFeatureEnabled: ?boolean,
|
||||||
isAudio: boolean,
|
isAudio: boolean,
|
||||||
poster: ?string,
|
poster: ?string,
|
||||||
|
@ -142,6 +143,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
||||||
title,
|
title,
|
||||||
channelTitle,
|
channelTitle,
|
||||||
embedded,
|
embedded,
|
||||||
|
embeddedInternal,
|
||||||
// internalFeatureEnabled, // for people on the team to test new features internally
|
// internalFeatureEnabled, // for people on the team to test new features internally
|
||||||
isAudio,
|
isAudio,
|
||||||
poster,
|
poster,
|
||||||
|
@ -310,7 +312,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
||||||
player.recsys({
|
player.recsys({
|
||||||
videoId: claimId,
|
videoId: claimId,
|
||||||
userId: userId,
|
userId: userId,
|
||||||
embedded: embedded,
|
embedded: embedded || embeddedInternal,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,7 +383,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
||||||
vjsPlayer.recsys.options_ = {
|
vjsPlayer.recsys.options_ = {
|
||||||
videoId: claimId,
|
videoId: claimId,
|
||||||
userId: userId,
|
userId: userId,
|
||||||
embedded: embedded,
|
embedded: embedded || embeddedInternal,
|
||||||
};
|
};
|
||||||
|
|
||||||
vjsPlayer.recsys.lastTimeUpdate = null;
|
vjsPlayer.recsys.lastTimeUpdate = null;
|
||||||
|
|
|
@ -525,6 +525,7 @@ function VideoViewer(props: Props) {
|
||||||
playNext={doPlayNext}
|
playNext={doPlayNext}
|
||||||
playPrevious={doPlayPrevious}
|
playPrevious={doPlayPrevious}
|
||||||
embedded={embedded}
|
embedded={embedded}
|
||||||
|
embeddedInternal={isMarkdownOrComment}
|
||||||
claimValues={claim.value}
|
claimValues={claim.value}
|
||||||
doAnalyticsView={doAnalyticsView}
|
doAnalyticsView={doAnalyticsView}
|
||||||
doAnalyticsBuffer={doAnalyticsBuffer}
|
doAnalyticsBuffer={doAnalyticsBuffer}
|
||||||
|
|
|
@ -561,8 +561,6 @@ export const selectIsUriResolving = (state: State, uri: string) => {
|
||||||
return resolvingUris && resolvingUris.includes(uri);
|
return resolvingUris && resolvingUris.includes(uri);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const selectPlayingUri = (state: State) => selectState(state).playingUri;
|
|
||||||
|
|
||||||
export const selectChannelClaimCounts = createSelector(selectState, (state) => state.channelClaimCounts || {});
|
export const selectChannelClaimCounts = createSelector(selectState, (state) => state.channelClaimCounts || {});
|
||||||
|
|
||||||
export const makeSelectPendingClaimForUri = (uri: string) =>
|
export const makeSelectPendingClaimForUri = (uri: string) =>
|
||||||
|
|
Loading…
Reference in a new issue