File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 11<!DOCTYPE html>
22< html >
33 < head >
4- < meta name ="viewport " content ="width=device-width, maximum-scale=1.0 " />
4+ < meta name ="viewport " content ="width=device-width, " />
55 < style >
66 body {
77 margin : 0 ;
4343 controls_s,
4444 cc_lang_pref_s,
4545 contentScale_s,
46+ allowWebViewZoom,
4647 modestbranding_s,
4748 iv_load_policy,
4849 preventFullScreen_s,
5354 window . ReactNativeWebView . postMessage ( JSON . stringify ( msg ) ) ;
5455 }
5556
57+ let metaString = '' ;
58+ if ( contentScale_s ) {
59+ metaString += `initial-scale=${ contentScale_s } ` ;
60+ }
61+
62+ if ( ! allowWebViewZoom ) {
63+ metaString += `maximum-scale=${ contentScale_s } ` ;
64+ }
65+
66+ const viewport = document . querySelector ( 'meta[name=viewport]' ) ;
67+ viewport . setAttribute ( 'content' , 'width=device-width,' + metaString ) ;
68+
5669 var tag = document . createElement ( 'script' ) ;
5770 tag . src = 'https://www.youtube.com/iframe_api' ;
5871 var firstScriptTag = document . getElementsByTagName ( 'script' ) [ 0 ] ;
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ export const MAIN_SCRIPT = (
125125 iv_load_policy,
126126 contentScale_s,
127127 cc_lang_pref_s,
128+ allowWebViewZoom,
128129 modestbranding_s,
129130 preventFullScreen_s,
130131 showClosedCaptions_s,
You can’t perform that action at this time.
0 commit comments