I want to disable the centered play button on the video screen per clip in my playlist.
Globally the button can be disabled with the play attribute:
flowplayer("player", "flowplayer.swf", {
// stuff
play: null, // or play: {opacity: 0}
// more stuff
});
Because I can't access the flowplayer configuration, but the playlist I need this for the entries there.
Is this also possible in some way via playlist for specific entries?
Related
I'd like to achieve the same opening/closing animations as macOS' notifications center, basically having it slide from a side.
Is it possible to do this using electron?
I think it is possible. Electron has everything you need for it:
A Frameless Window is probably the way to go for this.
win.setPosition(x, y[, animate]), win.setSize(width, height[, animate]), win.hide() and win.show() is all you need to animate the window
screen and Display will help you put the window in the correct position
Initial state:
Place window at the side of the screen
Set to smallest possible width
Hidden
Opening:
Show window
Increase width and change position towards center of the screen until the window reaches the desired size
Closing:
Decrease width and change position towards side of the screen
Hide window when side is reached
The content of the window is then just CSS and JS magic, to make it look good.
Check out css animations here
You can position elements off screen with css and animate them in with css
No javascript required.
Here goes my first question. I've embedded a youtube video (HTML5) in a panel created using the Panel API from Firefox SDK. The problem is that the video won't go fullscreen. It tries to, but goes back to normal size within the panel. I've also tried to use the method described here with a random div but the same thing happens. So, is this a limitation from the api or is there any way I could get it to work? Thanks.
I've just started experimenting with a floating YouTube player plugin using the Firefox sdk and ran in to the same issue. I did find a some what sloppy work around, that you might find suitable to use.
This method causes the panel to resize to the full screen. However, when resizing it, even with the border property set to 0, the panel will still show a bit of a border.
in the main document, "index.js"
var self = require('sdk/self');
var data = require("sdk/self").data;
let { getActiveView }=require("sdk/view/core");
let myPanel = require("sdk/panel").Panel({
contentURL: "./index.htm",
contentScriptFile: ["./youtube.js", "./index.js"]
});
var player = getActiveView(myPanel);
player.setAttribute("noautohide", true);
player.setAttribute("border", 0);
player.setAttribute('style', 'background-color:rgba(0,0,0,0);');
myPanel.show();
init();
myPanel.port.on('fullscreen', fullScreen);
function init(){
var size = 30,
width = size * 16,
height = size * 9;
myPanel.resize(width,height);
}
function fullScreen(width, height){
player.moveTo(3840, 0); // Need to moove the video to the top left
//of the monitor or else the resize only takes a potion of the screen.
//My left position is 3840 because i'm doing this on my right
//screen and the left is 4k so i need the offset.
myPanel.resize(width,height);
}
And in my content script file
var container = document.getElementById('container'),
overlay = document.getElementById('overlay');
overlay.addEventListener('click', fullscreen);
function fullscreen() {
var x = window.screen.availWidth,
y = window.screen.availHeight;
self.port.emit('fullscreen', x, y);
}
Some things I've noticed while experimenting is that when playing YouTube videos in the panel, the video has a tendency to lag, but the audio plays fine. The lag gets more apparent when moving the mouse over elements on other pages, and over the panel itself. The faster the movement the more apparent it becomes. I've found a workaround for mousing over the panel by placing an div that stretches over the video. The problem with this is that the default YouTube controls don't react to the mouse over, which would be possible to get around by using the YouTube api and creating custom controls. Also multiple monitor support would be hard to work with when positioning the video.
Edit:
Here's another way that does the same thing, but this one appears to deal with multi monitor support. It will position to the top left of whatever window firefox is currently on.
in the index.js file
function fullScreen(width, height){
myPanel.hide();
myPanel.show({position:{left:0,top:0}});
myPanel.resize(width,height);
}
I am making a game and player has to reach at specific destination.
I want to show side game map to guide him the way that where is he now and where he has to go. Just like GTA and other game where a side map always appear in any screen corner which guide player.
I don't have any idea how can I do this I checked it on google but maybe I'm missing the appropriate words for searching.
currently I made a photo of my scene and just showing it on right bottom corner of my game screen. how can I place current user position and destination position and change it accordingly as player move??
public Texture mapTexture;
void OnGUI() {
GUI.DrawTexture(new Rect(Screen.width - 200, Screen.height-200, 200, 200),mapTexture);
}
Thanks to google and #Serlite.
using this youtube video and unity3d Web.
I made side camera (minimap camera) parent to my player and set the Normalized View Port Rect property setting and Al-hamdu-lillah its working:)!! "" camera setting
I'm using easeljs in order to control my CANVAS.
And I'm trying to make animation by changing images, but not using spritesheet.
But whenever images are changed there is time lag( like blinking)...
How can I remove blinking not using spritesheet?
My guess (until you provide code), is that the image is being loaded during this gap, that's why you see a blink, and this is because you are loading the image in the same container (meaning the place where the image is loaded/displayed).
The solution to this is to use 2 containers, one in the top of the other; you have the first image loaded, and when you load the next image, you set a complete event on that second image, and when the second image loads, you remove the first one.
In the end you will have to create a class to manage both images and their events, this because if you are trying i.e. creating an image rotator, you will have to swap the bottom image loaded to the top, to make a smooth transition, and/or to add an alpha tween.
This is a very simple outline:
Container
topImage
bottomImage
this.addChild(topImage)
this.addChild(bottomImage)
bottomImage.on("complete", function(){
//add effect to top image (fade out)
//load image into top image
//fadein effect
})
topImage.on("complete", function(){
//first time you have to add an fade in
//but you can remove the event after that
})
this.load = function(path){
bottomImage.load(path)
}
I have some symbols in my flash project. It's a chemistry elements. It's pathes looks like
Scene 1->elem h
Scene 1->elem he
Scene 1->elem li
When i click one of this elements its play their animation - element zoom in. When i clicked on zoomed element - its zoom out. I need if i zoom in the element, all another elements zoom out (if their zoomed ofcourse).
The question is how to start symbol animation from another symbol.
I use Adobe Flash Professional CS5.5 and action-script 2
On the main timeline, you want to create 2 functions:
function resetAllClips()
{
// Some loop/code to reset all clips
}
function zoomClip(clip)
{
// Reset Everything
resetAllClips();
// Now Zoom in
// ... your code for zooming ...
}
Now you attach an click handler on each of your clips and call zoomClip(clipinstance);
All your code can reside on the main timeline.