mediaview

JavaFX setOnEndOfMedia on next MediaPlayer

断了今生、忘了曾经 提交于 2021-02-11 15:37:32
问题 I have List<MediaPlayer> that is populating by private List<MediaPlayer> players() { for (String file : path.list((dir1, name) -> { if (name.endsWith(SUPPORTED_VIDEO_FILE_EXTENSIONS)){ return true; } return false; })) { players.add(createPlayer(Paths.get(path + "/" + file).toUri().toString())); System.out.println(Paths.get(path + "/" + file).toUri().toString()); } return players; } In my case size of List<MediaPlayer> is 3. Than i use it there if (currentNumOfVideo == -1) { currentNumOfVideo

Google Ads MediaView not correctly resizing height to wrap_content when displaying image

孤街醉人 提交于 2020-01-01 04:38:05
问题 I got an email from AdMob today saying: Change to native ads policy: Native ads will require MediaView to render the video or main image asset. In an effort to help you deliver a better ad experience more easily, beginning October 29th, native ads will require MediaView to render the video or main image asset. Ad units not compliant by this date will stop serving ads, which could impact your ad revenue. I tried this out in my Android app, removing the separate handling of images with

How do I make JavaFX MediaView stretch and shrink media to fill/fit parent container?

泄露秘密 提交于 2019-12-25 10:20:13
问题 How do I make JavaFX MediaView stretch and shrink media to fill/fit parent container? There's already a question here: How do I make JavaFX MediaView stretch media to fill parent container? and the solution with this code: <Pane fx:id="mediaViewPane"> <children> <MediaView fx:id="videoView" fitHeight="${mediaViewPane.height}" fitWidth="${mediaViewPane.width}" layoutX="1.0" /> </children> </Pane> works for making the video bigger to fill the container, but it doesn't allow the container to be

Google Ads MediaView not correctly resizing height to wrap_content when displaying image

可紊 提交于 2019-12-03 12:48:27
I got an email from AdMob today saying: Change to native ads policy: Native ads will require MediaView to render the video or main image asset. In an effort to help you deliver a better ad experience more easily, beginning October 29th, native ads will require MediaView to render the video or main image asset. Ad units not compliant by this date will stop serving ads, which could impact your ad revenue. I tried this out in my Android app, removing the separate handling of images with ImageView and video with MediaView , but I have found that the MediaView is not resizing the view's height