Open marwahaha opened 10 years ago
how can i build all plugins into one swf file? any BuiltInConfig.as sample? thx
they are commented out in the file. that will give you the information you need. You have to add the sources and the swc library files to the build
this adds the paths to sources plugin-classes=
this adds the paths to swc files plugin-swc=
ie
package {
import org.flowplayer.controls.Controls;
public class BuiltInConfig {
private var controls:org.flowplayer.controls.Controls;
public static const config:Object = {
"plugins": {
"controls": {
"url": 'org.flowplayer.controls.Controls'
}
}
};
}
thx danrossi, i tried this but loadCaptions(); hide/showButton(); function not work.
plugin-classes=${plugins.dir}/controls/src/actionscript ${lib.dir}/common/src/actionscript ${plugins.dir}/content/src/actionscript ${plugins.dir}/captions/src/actionscript
plugin-swc=${plugins.dir}/controls/src/flash ${plugins.dir}/captions/src/flash ${plugins.dir}/content/src/flash
package {
import org.flowplayer.captions.CaptionPlugin;
import org.flowplayer.content.Content;
import org.flowplayer.controls.Controls;
public class BuiltInConfig {
private var captions:org.flowplayer.captions.CaptionPlugin;
private var content:org.flowplayer.content.Content;
private var controls:org.flowplayer.controls.Controls;
public static const config:Object = {
"plugins": {
"captions": {
"captionTarget": "content",
"url": "org.flowplayer.captions.Caption"
},
"content": {
"url": "org.flowplayer.content.Content"
},
"controls": {
"url": "org.flowplayer.controls.Controls"
}
}
}
};
}
"url": "org.flowplayer.captions.CaptionPlugin"
O_o ok i fix it but seems still not work here is my files http://1drv.ms/1xuT15F
package {
import org.flowplayer.captions.CaptionPlugin;
import org.flowplayer.content.Content;
import org.flowplayer.controls.Controls;
public class BuiltInConfig {
private var captions:org.flowplayer.captions.CaptionPlugin;
private var content:org.flowplayer.content.Content;
private var controls:org.flowplayer.controls.Controls;
public static const config:Object = {
"plugins": {
"captions": {
"captionTarget": "content",
"url": "org.flowplayer.captions.CaptionPlugin"
},
"content": {
"url": "org.flowplayer.content.Content"
},
"controls": {
"url": "org.flowplayer.controls.Controls"
}
}
}
};
}
$f("id").getPlugin("captions").hideButton(); try that no idea. is it actually loading. you should see a browser log !.
i've tested
package {
import org.flowplayer.content.Content;
import org.flowplayer.controls.Controls;
public class BuiltInConfig {
private var content:org.flowplayer.content.Content;
private var controls:org.flowplayer.controls.Controls;
public static const config:Object = {
"plugins": {
"captions": {
"captionTarget": "content",
"url": "flowplayer.captions.swf"
},
"content": {
"url": "org.flowplayer.content.Content"
},
"controls": {
"url": "org.flowplayer.controls.Controls"
}
}
}
};
}
loadCaptions(); hide/showButton(); function not work but subs can display. flowplayer.captions.swf download from http://flash.flowplayer.org/plugins/flash/captions.html
<!doctype html>
<meta charset="utf-8">
<script src="flowplayer-3.2.13.min.js"></script>
<div id="player" style="width:640px; height:360px; display:block"></div>
<script>
$f('player','flowplayer-3.2.18.swf',{
clip:{
url:'sample.mp4',
captionUrl:'buffalo.srt'
}
})
</script>
this way everything works fine, use the same flowplayer-3.2.18.swf, function only broken when built-in?
<!doctype html>
<meta charset="utf-8">
<script src="flowplayer-3.2.13.min.js"></script>
<div id="player" style="width:640px; height:360px; display:block"></div>
<script>
$f('player','flowplayer-3.2.18.swf',{
clip:{
url:'sample.mp4',
captionUrl:'buffalo.srt'
},
plugins: {
captions: {
captionTarget: "content",
url: "flowplayer.captions.swf"
}
}
})
</script>
Thanks to marwahaha! Your update of the installation instructions was yery helpful to me. :)
I think it would be really helpful to update the building instructions. The ramp-up seems to be the hardest part..
This is what I came up with for myself, maybe the repo or website could use it?
1. Clone the flash, flash-build, and tld repositories:
2. Edit the flash-build/build.properties file:
3. Edit the flash-build/plugin-build.properties file:
4. If on Windows, make these edits:
5. If on Mac, your default java may not have a 32-bit option. (Mac JDK 1.7 and 1.8 only support 64-bit JVMs.) The Flex compilers necessary to build the project depend on a 32-bit JVM (Java Virtual Machine).
You can check defaults by running
If you see this error, then you'll have to point to a JDK that supports a 32-bit JVM, like 1.6. Otherwise, you can move on.
You may have other JDKs installed: Check by running
For me, this printed out:
You can change the default java for the current session by running
This prepends the PATH variable will all commands from JDK 1.6 (including java). "java" will now point to 1.6 for this terminal session.
6. Change directory to flash-build, and run "ant":
If you see BUILD SUCCESSFUL, you have successfully compiled. Your swf files are in the directories "site" and "flash-build/build".