See https://github.com/caprica/vlcj/tree/vlcj-4.x#threading-model
# Threading Model
This section is very important.
With vlcj-4, every native event coming from LibVLC is processed on the
native callback thread. This should give some small performance gains
when compared with vlcj-3.
The critical issue is that it is generally not permitted to call back
into LibVLC from the event callback thread. Doing so may cause subtle
failures or outright hard JVM crashes.
A prime example of the sort of trap waiting for you is the very common
case of handling a media player "finished" event so that you can then
play the next item in a play-list:
```java
mediaPlayer.events().addMediaPlayerEventListener(new MediaPlayerEventAdapter() {
@Override
public void finished(MediaPlayer mediaPlayer) {
mediaPlayer.media().play(nextMrl); // <-- This is VERY BAD INDEED
}
});
```
In this example, the finished method is being invoked on a native
callback thread owned by LibVLC. The implementation of this method is
calling back into LibVLC when it invokes play. This is very likely to
cause a JVM crash and kill your application.
In cases such as this, you should make use of an asynchronous
task-executor queue conveniently provided by the MediaPlayer object
passed to the listener method:
```java
mediaPlayer.events().addMediaPlayerEventListener(new MediaPlayerEventAdapter() {
@Override
public void finished(final MediaPlayer mediaPlayer) {
mediaPlayer.submit(new Runnable() {
@Override
public void run() {
mediaPlayer.media().play(nextMrl);
}
});
}
});
```
Changes:
- added k/wasm target to library and demo
- added libs.versions.toml with coroutines version
Tested:
- using demo project
- publishToMavenLocal
I'll setup the test separately.
---------
Co-authored-by: Oleksandr.Karpovich <oleksandr.karpovich@jetbrains.com>
Reason: newer compose-core libs were built with kotlin 1.9.21. Previous
kotlin/native version 1.9.10 is not compatible with it.
Co-authored-by: Oleksandr.Karpovich <oleksandr.karpovich@jetbrains.com>
There was a problem with an android publication. Android artifactId has
name "module_name"-"android" even though we explicitly renamed
artifactId inside the configureMavenPublication block. It means that
"components-ui-tooling-preview" android library rewrites
"components-resources" android library on the maven. Because they have
the same name "library-android".
Library `org.jetbrains.compose.components:components-ui-tooling-preview`
**This library is subject to change in the future.**
Added library
`org.jetbrains.compose.components:components-ui-tooling-preview:VERSION`,
where VERSION - shoud will be Compose version.
Simple Preview without arguments and PreviewParameterProvider for future
usage.
---------
Co-authored-by: Igor Demin <igordmn@users.noreply.github.com>
* Updated links to new onboarding articles
* Updated links documentation articles moved to the new doc portal
* Added placeholders for moved pages
---------
Co-authored-by: Ekaterina.Volodko <ekaterina.volodko@jetbrains.com>