I am a newbie in Unity3d and Parse.com.
I want to play online video that I store in Parse.com. However when I get an AbsoluteUri of parse file for play, It open video and just play for 1s then it auto close. What thing I did wrong ? see the code below
public void queryBundleWithName(){
var query = ParseObject.GetQuery ("AssetBundle").
WhereEqualTo("name", "Board");
query.FirstAsync().ContinueWith(t =>{
ParseObject relatedObjects = t.Result;
string name = relatedObjects.Get<string>("name");
//isFinish = true;
urlVideo = relatedObjects.Get<ParseFile>("video").Url.AbsoluteUri;
textResult.text = urlVideo;
Screen.orientation = ScreenOrientation.LandscapeLeft;
Handheld.PlayFullScreenMovie (urlVideo, Color.black, FullScreenMovieControlMode.CancelOnInput, FullScreenMovieScalingMode.AspectFill);
});
}
Thank for your help.
Related
guys, I'm building a music app in flutter and I have a problem which I don't know how to resolve, so if someone can help me out on this.
So this is the thing I have songs that are stored on CloudFront and they work perfectly
play(song, context) async {
int result = await audioPlayer.play(song); //path to the song
setState(() {
isPlaying = true;
});
// int seek = await audioPlayer.seek(Duration(minutes: 10, seconds: 10));
if (result == 1) {
return 'succes';
}
}
but when I give another path from podbean it will not start playing "https://mcdn.podbean.com/mf/play/9i7qz8/Japji_Sahib_Pauri_3.mp3" -> this is the link you can play it in browser
Error message. Shows after some time on the initial play of the podcast
Any idea what I can do about this problem.
Thanks in advance.
how to play multiple videos one after the another in xamarin cross platform form c#
I have tried using list, array but the problem is that the last video only gets played, rest videos just doesnt play.
MediaQueue mq = new MediaQueue();
MediaFile mf = new MediaFile();
if (PlayStopButtonText.Text == "Play")
{
/*string videoUrl1 = "https://archive.org/download/BigBuckBunny_328/BigBuckBunny_512kb.mp4";
string videoUrl = "https://sec.ch9.ms/ch9/e68c/690eebb1-797a-40ef-a841-c63dded4e68c/Cognitive-Services-Emotion_high.mp4";
CrossMediaManager.Current.Play(videoUrl,MediaFileType.Video,ResourceAvailability.Remote);
//CrossMediaManager.Current.PlayNext();*/
mf.Url = videoUrll;
mf.Type = MediaFileType.Video;
mq.Insert(0,mf);
mf.Url = videoUrl;
mf.Type = MediaFileType.Video;
mq.Insert(1, mf);
foreach(var item in mq)
{
CrossMediaManager.Current.Play(item.Url,MediaFileType.Video);
}
}
I am having this issue which I hope you can help me solve. Basically I have set up twitter sharing on Corona SDK (using the social plugin) so that players can post their highscores. The game would save a JPEG image and then Twitter loads this inside the message when sharing.
Now the issue is that on iOS, this works perfectly, but on Android devices the image doesn't show in the message body. Can you please help me as I have been banging my head trying to figure this out but have gotten nowhere. Cheers.
Here is my code to take the screenshot:
function takePhoto()
local baseDir = system.DocumentsDirectory
display.save(overlayGroup, "myScreenshot.jpg", baseDir )
print("PIC SAVED")
end
And this these are the options for sharing:
local options = {
service = "twitter",
message = "You got a highscore! ",
listener = tweetCallback,
image = {
baseDir = system.DocumentsDirectory,
filename = "myScreenshot.jpg"
}
}
And these are the code in build.settings
android =
{
versionCode = "1",
googlePlayGamesAppId = "xxxxxxxxxx", --My code is here
usesPermissions =
{
"android.permission.INTERNET",
"android.permission.WRITE_EXTERNAL_STORAGE",
"android.permission.ACCESS_WIFI_STATE",
"android.permission.ACCESS_NETWORK_STATE",
},
}
I have a strange isuue in Yii.
We are using Yii for webservice with Android and IOS. In the mobile there have video uploading page.
This is the code iam using in Yii to upload video:
$file_path_image = "";
$directory='images/Post';
$file_path_video = "";
$model = new TblCommunity();
if(isset($_FILES['video'])){
$file = $_FILES['video'];
print_r($file);
$videoID = $model->getRandomString();
$video_obj = new VideoUpload();
$result = array();
$video_result_temp = $video_obj->upload($file, $videoID, $directory);
$result = CJSON::decode($video_result_temp);
if(isset($result['status']) && $result['status'] == 'failed'){
$result['response'] = array();
$result['status']='failed';
$this->_sendResponse(201, CJSON::encode($result));
} else {
$file_path_video = Yii::app()->params['BASE_URL'].$result['Path'];
}
}
The above code will work for small size videos.
But when the mobile guys start to upload a big size or above 5MB , I didnt get any data in Yii.
Its wasting my a week full of time.
What is the reason for this strange behaviour?
All helps are appreciable.
When sending large size video , the Yii returns error as Undefined index 'video'.
There can be 2 reasons:
Model rules (max file size)
Php/Server settings (upload_max_filesize, post_max_size)
Did you check this already?
Hey everyone so I was wondering if there is a easy method of doing this or if it can even be done without an ANE Native Extension. I picked up some code from around here and in my Flash CS6 Android AIR Application using AS3 I created two buttons on the stage one for Facebook and the other for Twitter. When the user clicks on the buttons they are redirected to the URL's and are able to post the link that I give in the vars like so:
//Share button event listener
menuEnd.share_Facebook.addEventListener(MouseEvent.CLICK, shareFacebook);
menuEnd.share_Twitter.addEventListener(MouseEvent.CLICK, shareTwitter);
private function shareTwitter(e:MouseEvent):void
{
var varsShare:URLVariables = new URLVariables();
varsShare.u = 'https://play.google.com/store/apps/details?id=air.bunnyRunner';
varsShare.t = 'Jumpy Bunny';
var urlTwitterShare:URLRequest = new URLRequest('http://twitter.com/home?status= Jumpy Bunny by Fitchett Productions: ');
urlTwitterShare.data = varsShare;
urlTwitterShare.method = URLRequestMethod.GET;
navigateToURL(urlTwitterShare, '_blank');
}
private function shareFacebook(evt:MouseEvent):void
{
var varsShare:URLVariables = new URLVariables();
varsShare.u = 'https://play.google.com/store/apps/details?id=air.bunnyRunner';
varsShare.t = 'Jumpy Bunny';
var urlFacebookShare:URLRequest = new URLRequest('http://m.facebook.com/sharer.php');
urlFacebookShare.data = varsShare;
urlFacebookShare.method = URLRequestMethod.GET;
navigateToURL(urlFacebookShare, '_blank');
}
So now I was wondering since I have sharedObject data in my game is there anyway to get that shared.data and display it on facebook when the user clicks the button it shares the data to facebook and they can post their highscore?
Thanks guys any help is appreciated.