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,
|
||||
title: ?string,
|
||||
channelTitle: string,
|
||||
embedded: boolean,
|
||||
embedded: boolean, // `/$/embed`
|
||||
embeddedInternal: boolean, // Markdown (Posts and Comments)
|
||||
internalFeatureEnabled: ?boolean,
|
||||
isAudio: boolean,
|
||||
poster: ?string,
|
||||
|
@ -142,6 +143,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
title,
|
||||
channelTitle,
|
||||
embedded,
|
||||
embeddedInternal,
|
||||
// internalFeatureEnabled, // for people on the team to test new features internally
|
||||
isAudio,
|
||||
poster,
|
||||
|
@ -310,7 +312,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
player.recsys({
|
||||
videoId: claimId,
|
||||
userId: userId,
|
||||
embedded: embedded,
|
||||
embedded: embedded || embeddedInternal,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -381,7 +383,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
vjsPlayer.recsys.options_ = {
|
||||
videoId: claimId,
|
||||
userId: userId,
|
||||
embedded: embedded,
|
||||
embedded: embedded || embeddedInternal,
|
||||
};
|
||||
|
||||
vjsPlayer.recsys.lastTimeUpdate = null;
|
||||
|
|
|
@ -525,6 +525,7 @@ function VideoViewer(props: Props) {
|
|||
playNext={doPlayNext}
|
||||
playPrevious={doPlayPrevious}
|
||||
embedded={embedded}
|
||||
embeddedInternal={isMarkdownOrComment}
|
||||
claimValues={claim.value}
|
||||
doAnalyticsView={doAnalyticsView}
|
||||
doAnalyticsBuffer={doAnalyticsBuffer}
|
||||
|
|
|
@ -561,8 +561,6 @@ export const selectIsUriResolving = (state: State, uri: string) => {
|
|||
return resolvingUris && resolvingUris.includes(uri);
|
||||
};
|
||||
|
||||
export const selectPlayingUri = (state: State) => selectState(state).playingUri;
|
||||
|
||||
export const selectChannelClaimCounts = createSelector(selectState, (state) => state.channelClaimCounts || {});
|
||||
|
||||
export const makeSelectPendingClaimForUri = (uri: string) =>
|
||||
|
|
Loading…
Reference in a new issue