bonjour,
Dans l'inspecteur d'une page web contenant une vidéo youtube,le bouton qui met en plein écran est:
<button class="ytp-fullscreen-button ytp-button" aria-keyshortcuts="f" data-title-no-tooltip="Plein écran" aria-label="Plein écran Raccourci clavier f"><svg height="100%" version="1.1" viewBox="0 0 36 36" width="100%"><g class="ytp-fullscreen-button-corner-0"><use class="ytp-svg-shadow" xlink:href="#ytp-id-97"></use><path class="ytp-svg-fill" d="m 10,16 2,0 0,-4 4,0 0,-2 L 10,10 l 0,6 0,0 z" id="ytp-id-97"></path></g><g class="ytp-fullscreen-button-corner-1"><use class="ytp-svg-shadow" xlink:href="#ytp-id-98"></use><path class="ytp-svg-fill" d="m 20,10 0,2 4,0 0,4 2,0 L 26,10 l -6,0 0,0 z" id="ytp-id-98"></path></g><g class="ytp-fullscreen-button-corner-2"><use class="ytp-svg-shadow" xlink:href="#ytp-id-99"></use><path class="ytp-svg-fill" d="m 24,24 -4,0 0,2 L 26,26 l 0,-6 -2,0 0,4 0,0 z" id="ytp-id-99"></path></g><g class="ytp-fullscreen-button-corner-3"><use class="ytp-svg-shadow" xlink:href="#ytp-id-100"></use><path class="ytp-svg-fill" d="M 12,20 10,20 10,26 l 6,0 0,-2 -4,0 0,-4 0,0 z" id="ytp-id-100"></path></g></svg></button>
Le script d'AppleScript permettant d'ouvrir une vidéo youtube spécifique est celui-ci:
Avec l'lélément cité initialement,que rajouter dans ce script pour qu'un clic de souris mette cette vidéo youtube en plein écran après avoir ouvert cette page web?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 tell application "Google Chrome" activate set theUrl to "https://www.youtube.com/watch?v=0JNabWkrmvc" if (count every window) = 0 then make new window end if set found to false set theTabIndex to -1 repeat with theWindow in every window set theTabIndex to 0 repeat with theTab in every tab of theWindow set theTabIndex to theTabIndex + 1 if theTab's URL = theUrl then set found to true exit repeat end if end repeat if found then exit repeat end if end repeat if found then tell theTab to reload set theWindow's active tab index to theTabIndex set index of theWindow to 1 else tell window 1 to make new tab with properties {URL:theUrl} end if end tell
merci de votre aide
Partager