fewtoastMocarz
1piorunówJak to jest zrobione?
To specjalny popup, w trybie zawsze na wierzchu.
Na Firefox ta funkcja nie jest dostępna.
Działa na wzór Picture in Picture, ale z pełnym HTMLem.
#html #javascript #webdev #frontend
https://www.youtube.com/watch?v=EnlkqSVWheE

@fewtoast To jest picture-in-picture, w obydwu przypadkach, ale przez to, że Chrome wspiera API picture-in-picture, to mogli dodać customowy przycisk, który zmienia stan. Na Firefox przycisk do zmiany stanu picture-in-picture zobaczysz na każdym elemencie video (niekoniecznie tylko na TikTok), jeżeli source jest dłuższy niż 45s (można zmienić to w ustawieniach) i jeżeli nie ma ustawionego atrybutu disablePictureInPicture .
Link do API: https://developer.mozilla.org/en-US/docs/Web/API/Picture-in-Picture_API
HTMLVideoElement: disablePictureInPicture property - Web APIs | MDNThe HTMLVideoElement disablePictureInPicture property reflects the HTML attribute indicating whether the picture-in-picture feature is disabled for the current element.MDN Web Docs


















