Don’t worry, you can share videos from your app to Web Video Caster® and let Web Video Caster® handle all that.
wvc-x-callback://open?url=http%3A%2F%2Fmyvideoaddress.com
Just replace your video url there and you are done! But don't forget to url encode all param values, including the url.
&header=HEADER_NAME1:%20HEADER_VALUE1&header=HEADER_NAME2:%20HEADER_VALUE2
&secure_uri=true
String videoURL = "https://media.w3.org/2010/05/sintel/trailer.mp4";Intent shareVideo = new Intent(Intent.ACTION_VIEW);shareVideo.setDataAndType(Uri.parse(videoURL), "video/*");shareVideo.setPackage("com.instantbits.cast.webvideo");try {startActivity(shareVideo);} catch (ActivityNotFoundException ex) {// Open Play Store if it fails to launch the app because the package doesn't exist.// Alternatively you could use PackageManager.getLaunchIntentForPackage() and check for null.// You could try catch this and launch the Play Store website if it fails but this shouldn’t// fail unless the Play Store is missing.Intent intent = new Intent(Intent.ACTION_VIEW);String uriString = "market://details?id=com.instantbits.cast.webvideo" ;intent.setData(Uri.parse(uriString));startActivity(intent);}
Just replace videoURL with your video and you are done!
shareVideo.putExtra("subtitle", "replace with subtitle url");
shareVideo.putExtra("subs", new Uri[]{Uri.parse("http://subtitleserver.com/subtitlefile.srt")});
shareVideo.putExtra("subs.filename", new Uri[]{Uri.parse("http://subtitleserver.com/subtitlefile.srt")});
shareVideo.putExtra("title", "this is the title of the video");
shareVideo.putExtra("poster", "http://posterurl");
Bundle headers = new Bundle();headers.putString("Referer", "http://somereferrer");headers.putString("Cookie", "some cookie");headers.putString("User-Agent", "user agent string");shareVideo.putExtra("android.media.intent.extra.HTTP_HEADERS",headers);
String[] headers = {"Referer", "http://somereferrer", "Cookie", "some cookie", "User-Agent", "user agent string"};shareVideo.putExtra("headers",headers);
shareVideo.putExtra("secure_uri", true);
String videoURL = "https://media.w3.org/2010/05/sintel/trailer.mp4";Intent shareVideo = new Intent(Intent.ACTION_VIEW);shareVideo.setDataAndType(Uri.parse(videoURL), "video/*");shareVideo.setPackage("com.instantbits.cast.webvideo");shareVideo.putExtra("subtitle", "http://subtitleserver.com/subtitlefile.srt");shareVideo.putExtra("title", "this is the title of the video");shareVideo.putExtra("poster", "http://posterurl");Bundle headers = new Bundle();headers.putString("Referer", "http://somereferrer");headers.putString("Cookie", "some cookie");headers.putString("User-Agent", "user agent string");shareVideo.putExtra("android.media.intent.extra.HTTP_HEADERS", headers);shareVideo.putExtra("secure_uri", true);try {startActivity(shareVideo);} catch (ActivityNotFoundException ex) {// Open Play Store if it fails to launch the app because the package doesn't exist.// Alternatively you could use PackageManager.getLaunchIntentForPackage() and check for null.// You could try catch this and launch the Play Store website if it fails but this shouldn’t// fail unless the Play Store is missing.Intent intent = new Intent(Intent.ACTION_VIEW);String uriString = "market://details?id=com.instantbits.cast.webvideo" ;intent.setData(Uri.parse(uriString));startActivity(intent);}