I am using SWFobject to implement player from slideshare.
Using embedSWF method to get player:
swfobject.embedSWF("http://static.slidesharecdn.com/swf/doc_player.swf", "player", "700", "392", "8", null, flashvars, params, atts);
its giving me player correctly but now I want to customize options from player i.e I don't want options like zoom in, zoom out,show on slideshare etc currently which are there on player.
can I able to customize it?
SWF Object can be embeded in your code using following
swfobject.embedSWF(swfUrl, id, width, height, version, installSwfurl,
flashvars, params, attributes, callbackFn)
As you can see it has params as one of its parameter. Params can have menu, id, play, loop, quality, scale, etc.
To remove control menu keep menu as false. In your case, try below code
var params = {
menu: "false"
};
swfobject.embedSWF("http://static.slidesharecdn.com/swf/doc_player.swf", "player", "700", "392", "8", null, flashvars, params, atts);
I am not 100% sure about this as I have not tried it.
For more reference you can look at
flash-object-embed-tag-attributes
swfobject/wiki/documentation
This is not a SWFObject issue -- you're attempting to customize the look and feel of the SlideShare Player, which means you need to use their API. This is independent of SWFObject.
Please refer to the SlideShare Player API documentation.
Related
I'm developing a radio skill for Alexa and would like to disable the next and previous buttons when the skill is appearing on an Echo Show device.
I've tested other radio skills and they have these buttons disabled.
I haven't found anything on AudioPlayer Interface and PlaybackControllers Interface docs.
I'm using a radio.co stream. Take this as example: https://streams.radio.co/s931d44131/listen
No, those buttons can't be disabled.
But you can (and should) handle those kinds of requests too and return an empty response. We come to that issue with our project Convoworks and below is an empty response that we are using in such cases. Note that it ends the session, just as any other media related response.
{
"version" : "1.0",
"response" : {
"shouldEndSession" : true,
"type" : "_DEFAULT_RESPONSE"
},
}
I am writing a test for an element on the page, but not scrolled into view. Whenever I use pageObject.click("#MyElement) on the element, it throws this error:
Error while running .clickElement() protocol action: element click intercepted: Element is not clickable at point (621, 929)
The element will then scroll into view after the error is thrown. Not sure what is happening here.
I have tried using pageObject.moveToElement("#selector").waitForElementVisible("#selector"), but it does not work.
When this happens to me, I usually scroll the targeted element into the view first, then proceed to do my actions and/or assertions on it.
We'll use the execute method:
browser.element('css selector', <targetElemSelector>, (result) => {
browser.execute('arguments[0].scrollIntoView({behavior: "instant", block: "center", inline: "center"})', [result.value]);
browser.click(result.value.ELEMENT);
});
This approach also gives you a lot of flexibility with positioning your targeted element via scrollIntoView's attributes: you can lock the element at the top, the bottom, or center like in the example. This is especially useful for when you have to avoid overlapping of marketing popups, chatbots, GDPR notifications, etc.
I have an API powered by Django rest framework and I also use the default pagination option:
{
"count": 40,
"next": "http://127.0.0.1:8000/api/task/?page=2",
"previous": null,
"results": [{},{}...]
}
On angular side, I'm using ngResource to consume my api wiht the following code:
var task_resource = $resource('/api/task/:taskId/', {taskId:'#id'},{
query : {
method : 'GET',
isArray : false
}
});
I just want to be able, when the user click a 'next' button or scroll down to the bottom of the page to query the 'next' page until the end. I know I only have to GET on "next" field but if I do that, I will not use the $resource I defined.
I am wondering what is the solution for such a common pattern with angular and an API.
Since the 'next' url is absolute, you could simply use angular's built-in $http service for those requests. Something like $http.get(data.next).success(function(data){});
Another way would be to create your own custom pagination serializer as described here: http://www.django-rest-framework.org/api-guide/pagination#custom-pagination-serializers
Then you would need to create your own version of the NextPageField, and make it output without the domain part.
The standard implementation for the NextPageField can be found here:
https://github.com/tomchristie/django-rest-framework/blob/560f428e24c7676c660114c2daa6017ff61074ad/rest_framework/pagination.py
I am using jdev11.1.1.6
If i need to scroll to top of page..this works perfectly..
var scrollTop = function (event) {
$('.mainWrapper,body,html').animate( {
scrollTop : 0
}, 'slow');
}
I call it from pqr.jsff as
<af:commandLink text="click test" clientComponent="true" id="col7">
<af:clientListener method="scrollTop " type="click"/>
</af:commandLink>
link where it directs it to specific element
I modified my function as below but it doesn't work for me
var scrollToSpecificPosition= function (event) {
$('.mainWrapper,body,html').animate( {
scrollTop : $("#gl1").offset().top
}, 'slow');
}
gl1 is the id where i wish to point
<af:goLink id="gl1" text="test"></af:goLink>
I call it from pqr.jsff as
<af:commandLink text="click test" clientComponent="true" id="col7">
<af:clientListener method="scrollToSpecificPosition" type="click"/>
</af:commandLink>
I guess, problem is an Id field.
"gl1" id is right identificator for adf component, but in html-dom it will be a bit different, since adf component itself may have complex html structure and to keep id's unique adf will add a parents id's to it as a prefix, etc.
One more thing. You have to check that clientComponent option is set to "true", to make sure that this component will be available in dom. Then find with something like FireBug real component id,
it may look a bit more complex, something like "pt1:pg1:gl1:link". And if you sure that your code will always run in the same enviroment, you can hardcode this id.
Another options, is to use mask to find your component.
Also you can try to use AdfPage (native js lib) to get access to the adf components by their original id (though its not that easy to use and it have some limitation too).
I'm currently using extJS4 for the userinterface in a Zend Framework 1.9 application.
Currently I'm in the process of creating a popup where I want to show specific data, depending
on the data the page calling the iframe has.
I've got as far as creating the iframe when I click on the appropriate button
upWin=new Ext.Window({
title : "iframe",
width : 300,
height: 300,
layout : 'fit',
items : [{
xtype : "component",
autoEl : {
tag : "iframe",
src : "<?= $this->baseUrl("/mytest.php")?>"
}
}]
});
upWin.show();
My question here is how I could transfer the needed content/data into it. I don't want to use the GET paramter there if possible so is there any other option to do this?
(examples of the data I need in the mytest.php are id's and title text, .... so that I don't need a new .php page for each variant where I use this iframe).
EDIT:
To formulate it a bit more clearly...the get parameters or URL parameters are a thing I don't want to use if possible (thus I don't want to use /mytest.php?param1=value1¶m2=value2........ if it is avoidable).
You could possibly send the data you need in your php as parameters in the url (eg.
mytest.php?param1=value1¶m2=value2¶m3=value3&.........)
php provides functions in order to access the values of the aforementioned url parameters ...
google it