nasky Posted October 30, 2012 Share Posted October 30, 2012 Hello, am writing a video tutorial using cakephp. I have tried to embed my swf player using Javascript code. It works fine in all the index view of all my controllers but don't in other action/view. What could possibly be the problem. Any help would be appreciated Quote Link to comment https://forums.phpfreaks.com/topic/270053-flash-video-player-not-showing-in-views-with-cakephp/ Share on other sites More sharing options...
Mahngiel Posted October 30, 2012 Share Posted October 30, 2012 path to the assets have likely changed. replace the relative paths and replace with full paths. you can test with something like 'http://'+window.location.hostname + '/assets/swf/blah.swf' Quote Link to comment https://forums.phpfreaks.com/topic/270053-flash-video-player-not-showing-in-views-with-cakephp/#findComment-1388569 Share on other sites More sharing options...
nasky Posted October 30, 2012 Author Share Posted October 30, 2012 (edited) Thanks for the reply. This is the javascript code in my viewsI have also added the script in the layout and the osflv folder is in the webroot <script type="text/javascript"> AC_FL_RunContent('codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0', 'width', '320', 'height', '265', 'src', ((!DetectFlashVer(9, 0, 0) && DetectFlashVer(8, 0, 0)) ? 'osflv/OSplayer' : 'osflv/OSplayer'), 'pluginspage', 'http://www.macromedia.com/go/getflashplayer', 'id', 'flvPlayer', 'allowFullScreen', 'true', 'movie', ((!DetectFlashVer(9, 0, 0) && DetectFlashVer(8, 0, 0)) ? 'osflv/OSplayer' : 'osflv/OSplayer'), 'FlashVars','movie=video.flv&autoload=on&volume=70') </script> <!--<noscript> <object width='320' height='265' id='flvPlayer'> <param name='allowFullScreen' value='true'> <param name='movie' value='osflv/OSplayer.swf?movie= video.flv&autoload=on&volume=70'> <embed src= 'osflv/OSplayer.swf?movie=video.flv&autoload=on&volume=70' width='320' height='265' quality='high' type='application/x-shockwave-flash'> </embed> </object> </noscript>--> Edited October 30, 2012 by nasky Quote Link to comment https://forums.phpfreaks.com/topic/270053-flash-video-player-not-showing-in-views-with-cakephp/#findComment-1388872 Share on other sites More sharing options...
nasky Posted November 2, 2012 Author Share Posted November 2, 2012 (edited) I was finally able 2 solve it. Just added $this->webroot to my path. Thanks for the reply Edited November 2, 2012 by nasky Quote Link to comment https://forums.phpfreaks.com/topic/270053-flash-video-player-not-showing-in-views-with-cakephp/#findComment-1389808 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.