WebGL iOS video playback · Issue #770 - GitHub

文章推薦指數: 80 %
投票人數:10人

So I understand that there's an issue with playing video in WebGL on iOS devices, but just recently there has been a solution found that uses Unity's video ... Skiptocontent {{message}} RenderHeads / UnityPlugin-AVProVideo Public Notifications Fork 19 Star 123 Code Issues 114 Pullrequests 0 Actions Wiki Security Insights More Code Issues Pullrequests Actions Wiki Security Insights Newissue Haveaquestionaboutthisproject?SignupforafreeGitHubaccounttoopenanissueandcontactitsmaintainersandthecommunity. Pickausername EmailAddress Password SignupforGitHub Byclicking“SignupforGitHub”,youagreetoourtermsofserviceand privacystatement.We’lloccasionallysendyouaccountrelatedemails. AlreadyonGitHub? Signin toyouraccount Jumptobottom WebGLiOSvideoplayback #770 Open ASquareDevsopenedthisissue May7,2021 ·11comments Open WebGLiOSvideoplayback #770 ASquareDevsopenedthisissue May7,2021 ·11comments Assignees Labels enhancement🚀 Newfeatureorrequest WebGL WebGLplatform Comments Copylink ASquareDevs commented May7,2021 SoIunderstandthatthere'sanissuewithplayingvideoinWebGLoniOSdevices,butjustrecentlytherehasbeenasolutionfoundthatusesUnity'svideoplayer.IsthereawaywecangetasimilarsolutiontoworkforAvProVideo? Thesolutionpackagecanbedownloadedhere.... https://forum.unity.com/attachments/iosvideo-unitypackage.825305/ Theuserthatfounditpostedithereaswell.. https://forum.unity.com/threads/unity-webgl-video-player-doesnt-play-on-ios-mobile.930420/ ItusesausergeneratedactionthroughanHTMLcreatedbuttonthathasacallbacktothevideocreationfunctioninUnitywhenclicked.Justwantedtogiveyouguysaheadsupthatthereisatemporarysolutionouttheretoseeifyoucouldreplicateitusingyourplugin. Unityversion:2021.1.1f1 Thetextwasupdatedsuccessfully,buttheseerrorswereencountered: Allreactions MorrisRH added enhancement🚀 Newfeatureorrequest WebGL WebGLplatform labels May9,2021 Copylink Author ASquareDevs commented Jun1,2021 Wasthereanyluckreplicatingitorwereyouguysnotabletogettothisticketyet? Allreactions Sorry,somethingwentwrong. Copylink Contributor kahnivore commented Jun2,2021 Hi@ASquareDevs We'llgetbacktoyouassoonaswe'vebeenabletolookintothisproperly. Thanks 👍 1 ASquareDevsreactedwiththumbsupemoji 🎉 1 takamura-keigo20-fixerreactedwithhoorayemoji Allreactions 👍 1reaction 🎉 1reaction Sorry,somethingwentwrong. Copylink Author ASquareDevs commented Aug6,2021 Hey!Ourteamwaswonderingiftherewasanyforwardprogressonthisticket? Allreactions Sorry,somethingwentwrong. Copylink Author ASquareDevs commented Aug16,2021 HereisanexampleofunityvideoworkingonWebglmobileIOS.ThemainissueisWebglIOSwantstheusertocallplayonvideosandwon'tautoplay.WeworkarounditbyusingsomeJavaScripttomakeanhtmlbuttonthattheuserhastopresstogetpastthepermissionissueoftheuserhavingtocallplay. https://github.com/ASquareDevs/UnityVideoWebglDemo Allreactions Sorry,somethingwentwrong. Copylink DerrickBarra commented Sep14,2021 @kahnivore:Anyprogressonthis?WereallywanttouseAVProonWebGLsinceyouguyssupportHLSstreamingbutweneedthisbugtobefixed.Pleasecheckoutthelinkpostedtotherepo,itshowsthecurrentprocessformakingvideosplayoniOSWebGLviaajavascriptbuttontap. Allreactions Sorry,somethingwentwrong. kahnivore assignedMorrisRH Sep15,2021 Copylink DerrickBarra commented Sep28,2021 @kahnivore@MorrisRHHi,anyupdatesonthisticket? Allreactions Sorry,somethingwentwrong. Copylink Contributor kahnivore commented Oct1,2021 Wetriedtheexampleyoulinkedbutsofarwithoutsuccess.Unfortunatelywehaven'thadenoughtimetolookintoitfurther. Haveyouhadanyluckimplementingityourselves? Allreactions Sorry,somethingwentwrong. Copylink Author ASquareDevs commented Oct4,2021 https://drive.google.com/drive/folders/1jctLc8pRU2gO_4nXRT-F_276tlxmAuei?usp=sharing TheabovelinkcontainstutorialvideosthatwillhelpyousetupaWebGLbuildaswellashowtouploadittoyourownpersonalserver.Alongwiththesetutorialvideos,thereisanexamplevideoofitworkingonouriOSdevice(iPhoneSE15.0)andatextfileforadditionalinstructions. GitHubProject: https://github.com/ASquareDevs/UnityVideoWebglDemo Here'saworkinglinkfromtheGitHubproject https://brandxr-discovery.s3.amazonaws.com/WebGL/WebGl+Video+Example+for+AvPro/index.html Allreactions Sorry,somethingwentwrong. AndrewRH self-assignedthis Oct4,2021 Copylink Member AndrewRH commented Oct4,2021 Thanks@ASquareDevsfortheniceexamplesetc-I'msureitwillbeveryhelpful. Ijustwanttoclarifywhatyouwant.Itseemslikeyouhaveaworkingsolution-sowhatdoyouwantustodo? Iguessyouwantustointegratethissolutionsoit'seasiertodeploywithoutallofthesesteps.Wewillwouldhavetoseeifthat'spossible.Ihaven'twatchedyourtutorialvideosyet,butifitinvolvesaddinganHTMLbuttontoclickthenI'mnotsurehowwecanmakeagenericwaytoaddabutton..... Thanks, Allreactions Sorry,somethingwentwrong. Copylink DerrickBarra commented Oct4,2021 @AndrewRHtheissueisthatthistypeofsolution,clickingabuttoninjavascripttomakeavideoplayonWebGLiOSdoesnotworkwithAVProVideo,butitdoeswithUnityvideoplayer. Allreactions Sorry,somethingwentwrong. Copylink KeigoTakamura commented Oct8,2021 Ihaveaconcreteimplementationproposal iOSSafariistheworstandworstbrowser,butthereisasolution WhatarethespecificrestrictionsonvideoplaybackrestrictionsoniOSSafari? PlayingthevideobytheuserJesser. It'sabitannoyinginUnitybecauseyoucan'tmanipulatebrowsereventsdirectlywithjslikethree.js. Thetechnicaldifficultyisnotsohigh However,IalsounderstandthatAvPro​​Videoisahugeasset,soitisdifficulttoaddfunctionswithoutpollutingthedesign. ThisisbecausetheplaybackEventisdefinedbytheunifiedC#interfaceineachPlatform,soonlyoneextraflowwillbeforced. ・Premise It'simpossibletotellSafariauserjewelerwithUnityC#anduGUIelementsalone IneedtotellSafarithatI'mauserjescherusingjavascript ·solution FireJavaScriptEventfromUnityuGUIButtontostartplayingthevideo ·suggestion AddiOS-onlyjsEventtoAvProVideo.jslib. iOSForthPlay:function(playerIndex){ if(!_hasVideos(playerIndex)){ return0; } document.documentElement.addEventListener('pointerup',function(){ constcurTIme=_videos[playerIndex].vid.currentTime; _videos[playerIndex].vid.play(); },{once:true}); } MaketheabovejslibScriptcallUnity'sPlaymethodfromUnityEventTriggerwithPointerDown ThentheuserJesserwillcalliOSForthPlay()andtheplaybackEventwillbepointerup:addEventListener. Then,themomenttheuserreleasesthefinger,theplaybackEventwillbecalledanditwillbeplayable. However,therearesomeissueswiththeabovecode SincethereisnowaytoseetheUAfromUnityC#,itwillbealittledifficulttodealwiththebehaviorofWindowsChromeandAndroidChrome. Ifyouareageneralfront-endengineer,youcansolveitusingvideo.jsetc.,butUnityengineerdoesnothavesuchaconvenientthing,soifthereisabettersolutiontosolveit,smartlyswitchtheplaybackimplementationaccordingtoUAYoushouldbeableto I'mnotgoodatEnglish,soI'mwritingfromJapanesewithGoogleTranslate I'msorryifit'shardtounderstand(>_



請為這篇文章評分?