Closed mburger81 closed 4 years ago
Hi,
I successfully used locomote with Angular2 and Typescript. I think your test server is not serving the SWF file correctly.
@gaetancollaud Hi I know how to serve the SWF file correctly but the problem is, I want to set the path no with the absolute path!
My file strcture is this one:
/src/app/components/player/la-player.components.ts (my component)
/src/app/components/player/assets/swf/Player.swf (my needed SchockwavePlayer)
if i copy the Player.swf
under /src/assets/locomote/swf/Player.swf
and load Locomote
in this way new Locomote('player', 'assets/vendors/locomote/swf/Player.swf');
everything works fine, becouse http://localhost:3000/assets/vendors/locomote/swf/Player.swf'
finds the file copied under/src/assets
!
But I need to create a dynamic loaded component extracted from my rest app, it should life alone, so my Player.swf
should be in a local folder of the component and I want to load the player from the relative path where my component is and not from /src/assets
but from ./assets/
Ok, I see your problem. I don't know how requirejs work, but maybe you can find the path directly from it.
Do you think the problem is requirejs? Because I don't use requirejs toa load the Player.swf ... but I pass the RELATIVE URL to Locomote!
RequireJS is able to find the final url. Maybe you can use it to get the url of your current component to define the final url of the SWF (but I have no idea if that's possible, I'm just guessing)
Hi, I try to load your player in an angular2 component using angular2 webpack starter project.
The thing is, I need to load the Player and the
locomoto.min.js
realtive from the plugin directory.loading the minified javascript works but after then load the Player.swf relative from the component path does not work.
http://localhost:3000/assets/swf/Player.swf 404 (Not Found)
I think it is nit a Locomote problem or?