File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11apply plugin : ' com.android.application'
22
33android {
4- compileSdkVersion 22
5- buildToolsVersion ' 25.0.0'
6-
4+ compileSdkVersion 29
5+ buildToolsVersion ' 29.0.2'
76 defaultConfig {
87 applicationId " cpr.name.videoenabledwebview"
9- minSdkVersion 8
10- targetSdkVersion 22
8+ minSdkVersion 15
9+ targetSdkVersion 29
1110 versionCode 2
1211 versionName " 1.0.1"
1312 }
@@ -20,6 +19,6 @@ android {
2019}
2120
2221dependencies {
23- compile fileTree(dir : ' libs' , include : [' *.jar' ])
24- compile ' com.android.support :appcompat-v7:22.0 .0'
22+ implementation fileTree(dir : ' libs' , include : [' *.jar' ])
23+ implementation ' androidx.appcompat :appcompat:1.1 .0'
2524}
Original file line number Diff line number Diff line change 11package name .cpr ;
22
33import android .os .Bundle ;
4- import android .support .v7 .app .ActionBarActivity ;
54import android .view .View ;
65import android .view .ViewGroup ;
76import android .view .WindowManager ;
87import android .webkit .WebView ;
98import android .webkit .WebViewClient ;
109
10+ import androidx .appcompat .app .AppCompatActivity ;
1111import cpr .name .videoenabledwebview .R ;
1212
13- public class ExampleActivity extends ActionBarActivity
13+ public class ExampleActivity extends AppCompatActivity
1414{
1515 private VideoEnabledWebView webView ;
1616 private VideoEnabledWebChromeClient webChromeClient ;
@@ -76,7 +76,7 @@ public void toggledFullscreen(boolean fullscreen)
7676 webView .setWebViewClient (new InsideWebViewClient ());
7777
7878 // Navigate anywhere you want, but consider that this classes have only been tested on YouTube's mobile site
79- webView .loadUrl ("http ://m .youtube.com" );
79+ webView .loadUrl ("https ://www .youtube.com/watch?v=HGZYtDZhOEQ " );
8080
8181 }
8282
You can’t perform that action at this time.
0 commit comments