mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 16:11:20 -08:00
add playsInline option
This commit is contained in:
1 parent
b284381534
commit
4f10486987
57 files changed
+277
-219
No files matched your search
@@ -141,6 +141,7 @@ export default class Artplayer extends Emitter {
|
||||
subtitleOffset: false,
|
||||
miniProgressBar: false,
|
||||
useSSR: false,
|
||||
playsInline: true,
|
||||
ads: [],
|
||||
layers: [],
|
||||
contextmenu: [],
|
||||
|
||||
@@ -14,7 +14,9 @@ export default function eventInit(art) {
|
||||
const maxReconnectTime = 5;
|
||||
|
||||
proxy($video, 'click', () => {
|
||||
art.toggle();
|
||||
if (!isMobile) {
|
||||
art.toggle();
|
||||
}
|
||||
});
|
||||
|
||||
proxy($video, 'dblclick', () => {
|
||||
|
||||
@@ -32,6 +32,11 @@ export default function attrInit(art) {
|
||||
$video.autoplay = option.autoplay;
|
||||
}
|
||||
|
||||
if (option.playsInline) {
|
||||
$video.playsInline = true;
|
||||
$video['webkit-playsinline'] = true;
|
||||
}
|
||||
|
||||
if (option.theme) {
|
||||
art.theme = option.theme;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ export default {
|
||||
subtitleOffset: b,
|
||||
miniProgressBar: b,
|
||||
useSSR: b,
|
||||
playsInline: b,
|
||||
ads: [
|
||||
{
|
||||
url: s,
|
||||
|
||||
Reference in new issue
Block a user