Remove clearPosition functions for playlists (#1560)

- Let the position be cleared at the end like regular videos
This commit is contained in:
saltrafael 2022-05-24 07:07:46 -03:00 committed by GitHub
parent e3e675455a
commit 3918906605
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 0 additions and 11 deletions

View file

@ -36,7 +36,6 @@ const VideoJsEvents = ({
userId: ?number, userId: ?number,
claimValues: any, claimValues: any,
embedded: boolean, embedded: boolean,
clearPosition: (string) => void,
uri: string, uri: string,
doAnalyticsView: (string, number) => any, doAnalyticsView: (string, number) => any,
doAnalyticsBuffer: (string, any) => void, doAnalyticsBuffer: (string, any) => void,

View file

@ -98,7 +98,6 @@ type Props = {
doAnalyticsBuffer: (string, any) => void, doAnalyticsBuffer: (string, any) => void,
uri: string, uri: string,
claimValues: any, claimValues: any,
clearPosition: (string) => void,
isLivestreamClaim: boolean, isLivestreamClaim: boolean,
userClaimId: ?string, userClaimId: ?string,
activeLivestreamForChannel: any, activeLivestreamForChannel: any,
@ -157,7 +156,6 @@ export default React.memo<Props>(function VideoJs(props: Props) {
doAnalyticsBuffer, doAnalyticsBuffer,
claimRewards, claimRewards,
uri, uri,
clearPosition,
userClaimId, userClaimId,
isLivestreamClaim, isLivestreamClaim,
activeLivestreamForChannel, activeLivestreamForChannel,
@ -211,7 +209,6 @@ export default React.memo<Props>(function VideoJs(props: Props) {
claimRewards, claimRewards,
uri, uri,
playerServerRef, playerServerRef,
clearPosition,
isLivestreamClaim, isLivestreamClaim,
}); });

View file

@ -227,7 +227,6 @@ function VideoViewer(props: Props) {
if (playNextUrl) { if (playNextUrl) {
if (permanentUrl !== nextRecommendedUri) { if (permanentUrl !== nextRecommendedUri) {
if (nextRecommendedUri) { if (nextRecommendedUri) {
if (collectionId) clearPosition(permanentUrl);
doPlay(nextRecommendedUri); doPlay(nextRecommendedUri);
} }
} else { } else {
@ -249,7 +248,6 @@ function VideoViewer(props: Props) {
setEnded(false); setEnded(false);
setPlayNextUrl(true); setPlayNextUrl(true);
}, [ }, [
clearPosition,
collectionId, collectionId,
doNavigate, doNavigate,
doPlay, doPlay,
@ -509,7 +507,6 @@ function VideoViewer(props: Props) {
doAnalyticsBuffer={doAnalyticsBuffer} doAnalyticsBuffer={doAnalyticsBuffer}
claimRewards={claimRewards} claimRewards={claimRewards}
uri={uri} uri={uri}
clearPosition={clearPosition}
userClaimId={claim && claim.signing_channel && claim.signing_channel.claim_id} userClaimId={claim && claim.signing_channel && claim.signing_channel.claim_id}
isLivestreamClaim={isLivestreamClaim} isLivestreamClaim={isLivestreamClaim}
activeLivestreamForChannel={activeLivestreamForChannel} activeLivestreamForChannel={activeLivestreamForChannel}

View file

@ -117,10 +117,6 @@ export default function FilePage(props: Props) {
React.useEffect(() => { React.useEffect(() => {
// always refresh file info when entering file page to see if we have the file // always refresh file info when entering file page to see if we have the file
// this could probably be refactored into more direct components now // this could probably be refactored into more direct components now
if (collectionId) {
clearPosition(uri);
}
if (fileInfo && videoPlayedEnoughToResetPosition) { if (fileInfo && videoPlayedEnoughToResetPosition) {
clearPosition(uri); clearPosition(uri);
} }