Fix round video playback on iOS
Restrict reporting service messages
This commit is contained in:
parent
031b5198b8
commit
6b29cd426a
@ -329,7 +329,7 @@ export default class ChatContextMenu {
|
|||||||
onClick: () => {
|
onClick: () => {
|
||||||
new PopupReportMessages(this.peerId, [this.mid]);
|
new PopupReportMessages(this.peerId, [this.mid]);
|
||||||
},
|
},
|
||||||
verify: () => !this.message.pFlags.out && !this.message.pFlags.is_outgoing && this.appPeersManager.isChannel(this.peerId),
|
verify: () => !this.message.pFlags.out && this.message._ === 'message' && !this.message.pFlags.is_outgoing && this.appPeersManager.isChannel(this.peerId),
|
||||||
notDirect: () => true,
|
notDirect: () => true,
|
||||||
withSelection: true
|
withSelection: true
|
||||||
}, {
|
}, {
|
||||||
|
@ -251,6 +251,10 @@ export function wrapVideo({doc, container, message, boxWidth, boxHeight, withTai
|
|||||||
|
|
||||||
video.currentTime = 0;
|
video.currentTime = 0;
|
||||||
spanTime.innerText = ('' + globalVideo.duration).toHHMMSS(false);
|
spanTime.innerText = ('' + globalVideo.duration).toHHMMSS(false);
|
||||||
|
|
||||||
|
if(globalVideo.currentTime) {
|
||||||
|
globalVideo.currentTime = 0;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
globalVideo.addEventListener('play', onPlay);
|
globalVideo.addEventListener('play', onPlay);
|
||||||
@ -265,10 +269,11 @@ export function wrapVideo({doc, container, message, boxWidth, boxHeight, withTai
|
|||||||
if(preloader && !preloader.detached) {
|
if(preloader && !preloader.detached) {
|
||||||
preloader.onClick();
|
preloader.onClick();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(globalVideo.readyState < 2) {
|
// ! can't use it here. on Safari iOS video won't start.
|
||||||
|
/* if(globalVideo.readyState < 2) {
|
||||||
return;
|
return;
|
||||||
}
|
} */
|
||||||
|
|
||||||
if(globalVideo.paused) {
|
if(globalVideo.paused) {
|
||||||
globalVideo.play();
|
globalVideo.play();
|
||||||
|
@ -1152,7 +1152,11 @@ middle-ellipsis-element {
|
|||||||
fill: rgba(0, 0, 0, .08);
|
fill: rgba(0, 0, 0, .08);
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-photo, .media-video, .media-sticker, .media-round, .media-poster {
|
.media-photo,
|
||||||
|
.media-video,
|
||||||
|
.media-sticker,
|
||||||
|
.media-round,
|
||||||
|
.media-poster {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user