Embedding video in a dinamic page loaded using ajax

I've been trying to do this for some days now, and still couldnt find a solution.. this is the story:
I need to embed a movie (.mov, mp4, m4v) in a dynamic page loaded by an ajax call, i followed the recommendations specified in apple's page so i can monitor progress, and listen DOM events:
QuickTime and JavaScript
on Firefox, everything works very well, i can monitor progress, listen events, etc.. etc... (this app is intended to be multi browser)
On the contrary, IE is driving me crazy, it does not do anything.
So to debug this i did the following (for IE):
i tried then, creating a simple STATIC page in my computer, that loads the movie, and listens to its events, it worked good.
Then i put that html file in a web server, and every "first time" that i open the page, it wont work at all. After a reload, it will work good.
Then i created a simple page with an ajax call that will insert the html embedding the movie, and again it wont work in IE.
I want to be able to listen DOM events in IE in a dynamic page
Please help me with this.
<Edited by Moderator>

I've been fighting this last couple days as well.
Somehow the dom events are not fired
–in win explorer that is– when the movie is
inserted after the document loaded.
I've been trying many variation to get it to
work and just found a hackish way:
After you have added the movie via javascript
use the movie.SetURL('/movie.mov') function
and then the RegisterListener() function.
This enabled the Dom event for me.
Additionally you can use
movie.SetResetPropertiesOnReload(false) to
keep the movie properties.
function insertMov() {
var embtxt = QTGenerateOBJECTTextXHTML("../movies/main.mov",
477,
268,
'obj#id', 'mainobjId12',
'emb#id', 'mainembId12',
'emb#name', 'mainembName12',
'EnableJavaScript', 'True',
'postdomevents', 'True',
'autoplay', 'False',
'controller', 'False'
var mov_container = document.getElementById('mov_container');
mov_container.innerHTML= embtxt;
setTimeout('reg()',100);
function reg(){
document.getElementById('mainobjId12').SetResetPropertiesOnReload(false)
document.getElementById('mainobjId12').SetURL("../movies/main.mov");
RegisterListener('qt_canplaythrough', 'mainobjId12', 'mainembId12', aallrrtt);
function aallrrtt(){
alert('qt_canplaythrough');
}

Similar Messages

  • Invoking page process using AJAX

    Hi,
    Is it possible to invoke page process using AJAX, just like I can do it with application processes?
    Regards,
    Przemek

    Hi,
    Could you not have a application process that does an execute immediate on a block of PL/SQL? This way in your app process you could extract the code from your page process.
    So your code would like something like:
    SELECT region_source
    INTO v_plsql_source
    FROM apex_application_page_regions
    WHERE source_type = 'PL/SQL'
    AND application_id = :app_id
    AND page_id = :app_page_id
    AND static_id = :your_static_id; -- or you could reference from region name etc...
    execute immediate (v_plsql_source);
    I'm not sure if you'll have any issue with bind variables in v_plsql_source
    Martin
    [http://apex-smb.blogspot.com/]

  • URL of the current portal page loaded using Javascript ?

    Hello:
    I am trying to add programmatically the url of the current
    page loaded in the portal to the 'Favorites List'. There
    is a pre-built KM iview to store your 'favorites'.
    I can extract and write to this 'favorites' using KM java
    API. But only challenge is to extract the current loaded
    page URL and title using Javascript.
    I would appreciate any help in this regard.
    Thank you very much,
    Prasad Nutalapati

    Dude i was having the exact same problem. I solved it using the SAP-provided EPCM (javascript client framework).
    Javascript Code
    var pageName = "";
    var URL = "";
    function bookmarkPage()
         /* page url */
         var fullURL = "https://<%=request.getServerName()%>/irj/portal?NavigationTarget=" + URL;
         /* IE bookmark */
         if(EPCM.getUAType() == EPCM.MSIE)
              window.external.AddFavorite(fullURL , pageName);
         else
              var msg = "Sorry. The \"Add To Favorites\" feature only works with Internet Explorer. " +
                          "The URL to this page is " + fullURL;
              alert(msg);
    /* get pagename from eventObject from subscribed event */
    function getPageObject(eventObj) {
        pageName = eventObj.dataObject.title;
        URL = eventObj.dataObject.URL;
    /* subscribe to event in pagetoolbar area */
    EPCM.subscribeEvent("urn:com.sapportals:navigation", "AddNavTargetAllowDuplicate", getPageObject);
    End of code
    Basically, what this does is that everytime a page loads, the innerpage, where the content is, raises an event using  the EPCM.raiseEvent() method. EPCM.subscribeEvent subscribes to an event called AddNavTargetAllowDuplicate which has an object holding the page information (i.e. page title and URL (ROLE://...)). Everytime that it notices an event raised, the function getPageObject gets called to go get data from the event object that is available globally in the framework.
    You should be able to put this code anywhere in any iview and it should work. Thou i have only tried putting it in the masthead. Try and if you still have questions please let me know.

  • Dialog Box Open before Page load using af:CommandNavigationItem

    Hi,
    I have a CommandNavigationItem menu, the requirement is simple.
    Use Case:
    1. On click of one of the menu item, i need to display a message or prompt user to select "OK" or "Cancel"
    2. If user clicks "OK" will navigate to the require page. and "Cancel" will stay on the page.
    I have used couple of things like, creating a af:popup with a af:dialog and calling this popup from managed bean on page load, it works fine get a popup with a "OK" "Cancel" text. But the problem is it opens the popup fine but the parent page get loaded also.
    Please help me to find any solution? Will appreciate your time!!
    Thanks
    Neeraj Halder

    thanks vinod,
    I have tried but struggling with binding of the popup.
    1. let say when i login to my application my first page is "homeView.jspx", so on homeView.jspx i have written the code for popup.
    2. And in the menu i have "home" and "details", so when i click the "details" menu this popup should open, and on clicking ok it should navigate me to the Details page, as you suggested ActionListner for that.
    Please see below what i have done till yet.
    ActionListener Code:
    /*code in jsp
    actionListener="#{backingBeanScope.testViewBean.checkOnClickofDetails}"
    /* code in java with a backing bean scope
    private RichPopup validationMessageDialog;// popup id
    public void checkOnClickofDetails(ActionEvent actionEvent) {
    RichPopup.PopupHints popupHints = new RichPopup.PopupHints();
    getValidationMessageDialog().show(popupHints); //
    popup in homeView.jspx
    <af:popup id="validationMessageDialog"
    binding="#{backingBeanScope.testViewBean.validationMessageDialog}">
    <af:dialog id="d3" cancelTextAndAccessKey="cancel"
    dialogListener="#{backingBeanScope.testViewBean.loadDetails}"
    title="Prompt">
    <af:outputText value="#{msg.AGENT_NOT_FOUND}" id="ot3"/>
    </af:dialog>
    My doubt is i am doing something wrong with the scope of the managed bean. in the above code i have used backing bean scope,
    let say i have a java file example ABC.java, which is a backing bean scope given in adfc-config.xml. can i use this one java file for two of three different jspx as a backing bean? Hope i am clear here? :)
    2) when we create a jspx and its backing bean at a time, is there any internal mapping happen apart from adfc-config.xml that one jspx will have only one java file as a backing bean?
    Sorry if i am making this more complicated, above question comes because, when i move the same popup code in "Details.jspx" page and at the time of creation of this page i have created backing bean also so when i calling this function on page load "checkOnClickofDetails" which is in the Details.java (backing bean) the popup comes fine. but unfortunately cannot use this because parent page get laoded with this popup also.
    let me know if i am doing something wrong?
    Thanks,
    Neeraj Halder

  • How to Auto Select some RadioButton on page load using ADF/JSF

    Hi,
    I am learning ADF and need some help. I have multiple radio buttons and couple of text boxes on my page. How can I make some radio button be selected based on some value from a database table and also populate the text boxes with the corrosponding value when a page loads. Any tips on how it can be done using ADF. Any sample tutorial will be helpful.
    Thanks

    Hi,
    when you e.g. use ADF BC then the radio button should be selected automatically based on the value of the attribute. If the row is new then you can have a default value specified in the ADF BC ViewObject attribute.
    However, if you just dragged the radio button and checkboxes onto the page - not using any ADF binding - then you will have to create a managed bean with a field variable (incl. setter/getter methods) to link the radio button's value property to it using Expression Language
    Frank

  • Page reload using Ajax/ Javascript

    Hi All,
    I am new to Ajax, in my application i have to reload the page once i click on the link on a report column.
    Another one is how to call "On load process" by clicking on the report link.
    Can anybody help on this.
    thanx
    Madhu

    implement page submit with AJAX instead of javascriptSome comments
    <li>If you are submtting page, then you don't ajax coz you can do the processing in an Onsubmit PLSQL process
    <li>The J in AJAX stands for "Javascript."
    >
    My requirement is on clicking on the report column i have to call one javascript and in javascript i am setting item value then submitting the page with doSubmit, then it will run the onload process based on the item value.
    Again from onload process i am calling another javascript.
    >
    So "column link" -> "JS function" -> "SET Item" ->"Submit The Page" -> "on load process" ???
    If you are on apex 4.0 ,you can use Dynamic Action for such things
    <li> add a handler for the link column that can be used in identifying the link for instance
    by adding to the link attributes(in column properties)
    class="my_link"<li> Then add a Dynamic action that is fired when you click on the link
    Dynamic Action Name : Anything you want
    Triggering element type: jQuery Selector
    jQuery Selector: a.my_link
       True Action 1: Type : Javascript
             JS code : <Insert JS code  to set the item>
       True Action 1: *PLSQL*
            PLSQL source : <use the PSLQL code from your onload PLSQL process>
            Items to submit : <set item name>, <any other items being refered in PLSQL>

  • Error processing a page when using AJAX

    hi apex forum.
    I need your help with a problem that presents me with an application in apex 4.2.
    I have developed a html screen, in which I have created a table that contains a detailed items and on which the user can enter some values. these data that user enters, I calculate a total at the end of the page. To view the current total of the entries , the user presses a button that uses AJAX (to avoid having to refresh the whole page)  to calculate totals and at the same time, i call an AJAX process to add each record to an apex_collection , until here everything perfect.
    The problem is that when I want to save the information to pass it from apex_collection to the database (by pressing a button and make the official insert), I must first have to refresh the page, if not do it this way, Apex generate an Error Message.
    it's important to say that error does not apper, if before pressing the button, i first refresh the page.  Any suggestions??
    I think I should use some internally command to synchronize or update the page.... any suggestions are welcome.,
    thanks in advance,

    Soooo...
    What is the error you are seeing?
    Is the multi-row process still there? What exactly happens on submit (computations, validations, processes)?
    Have you tried to run with debug enabled and were you able to see where the error originates?

  • Submit page item using AJAX

    Hi All,
    Thanks for any help in advance.
    I am trying to submit an item into the session by using AJAX iin version 4.1
    I have a application process which is an on demand: run this application process when requested by a page process.
    begin
      :P4_FISCAL_YEAR2 := :AJAX_4_FISCAL_YEAR2;
    end;then in the item :P4_FISCAL_YEAR2 have the html form element attributes set to:
    (also the page item is set to None(Default) on page action when value changed.
    onchange="selectChanged6(this)"and a page process
    <script type="text/javascript">
    function selectChanged6(filter)
    var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=SET_4_FISCAL_YEAR2',0);
    get.add('AJAX_4_FISCAL_YEAR2', filter.value);
    var ret = get.get();
    </script>The item doesnt seem to be submitting into the session and I cant figure out why, Thanks

    Marie,
    I think I have acomplished what you are looking for but if your goal is quick response time then this can fluctuate since there is 1 ajax call made to set your item value and another ajax call for every chart you want to refresh.
    This solution assumes the following:
    1. all reports are in the same language and in english.
    2. all reports are flash charts.
    here is a demo: http://apex.oracle.com/pls/apex/f?p=43401:23:0
    Go into your chart template and add the class refreshable_chart
    <div class="rounded-corner-region refreshable_chart" id="#REGION_STATIC_ID#" #REGION_ATTRIBUTES#>
    ...Create the following dynamic action on your chart page:
    Name: refresh_chart
    Event: Change
    Selection Type: Item(s)
    Item(s): P4_FISCAL_YEAR2
    True actions:
    Sequence: 10
    Action: execute pl/sql code
    Code:
    NULL;
    {code}
    Page Items to Submit: P4_FISCAL_YEAR2
    Sequence: 20
    Action: Execute JavaScript code
    Affected Elements:
    -- Type: jQuery Selector
    -- jQuery Selector: .refreshable_chart
    Code:
    {code:javascript}
    this.affectedElements.each(function(){
      apex_RefreshFlashChart(&APP_PAGE_ID., this.id.substr(1), 'en');
    {code}
    Good Luck,
    Tyson Jouglet
    Edited by: Tyson Jouglet on Dec 14, 2011 10:33 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Embedding video in a web page

    One of my looming projects is to redo part of my own little
    DVD site, particularly the page with the demos :
    existing page
    ie by embedding the video, so you can just click play etc as
    on you tube etc, ie something more like this example :
    video example
    It's probably pretty painless, but not sure where to start -
    plus there are probably countless different options, so if anyone
    could point me in the direction of putting up something like the
    example above, that would be great.
    Cheers.

    I haven't had a chance to look at this yet, but assuming it
    is using Flash, I had a google, and found stuff like this :
    how
    to...
    Or, in fact this -
    Flash
    Video Player

  • How to refresh JSFF page only when page loaded using ADF 11g

    Hi
    I am facing an issue with prepreModel() usage in the .jsff page fragment. I want to invoke executables only when the specific jsff page get's loaded. I tried using 'prepareModel' as a refresh condition, but I can see always executables are getting executed. Does 'prepareModel' behaves differently for .jsff when compared to .jspx ?
    Thanks in Advance

    Hi,
    ADF Regions have a slightly modified lifecycle. However, prepareModel behaves the same. Its marking a specific time in the ADF request lifecycle when the iterators are refreshed. Try prepareModelIfNeeded
    Frank

  • Popup on page load using managed bean, using jdev-11.4

    Hi,
    My requirement is on the button click from page 1 the control should get passed to new window(2nd page), and the popup should be opened on load.
    And after clicking button on the pop-up the control should get transferred to the 3rd page.
    Please let me know how to do this.
    Thanks,
    Nitin

    Here, is a sample based on the mentioned use-case.
    1) Create three pages namely FirstPage, SecondPage & ThirdPage
    2) Create the following navigation rules
    From FirstPage to SecondPage ==> gotoSecond
    From SecondPage to ThirdPage ==> gotoThird
    3) The following code snippets show the flow.
    FirstPage.jspx:
    <af:document id="d1">
    <af:form id="f1">
    <af:commandButton text="Go to Second Page" id="cb1"
    action="gotoSecond"/>
    </af:form>
    </af:document>
    SecondPage.jspx:
    *<f:view beforePhase="#{SecondPageBean.phaseListener}">*
    <af:document id="d1">
    <af:form id="f1">
    <af:popup id="p1" binding="#{SecondPageBean.popup}">
    <af:dialog id="d2" closeIconVisible="false" type="none">
    <af:outputLabel value="Popup Contents" id="ol1"/>
    *<af:commandButton text="Go to Third Page" id="cb1"*
    action="gotoThird"/>
    </af:dialog>
    </af:popup>
    </af:form>
    </af:document>
    </f:view>
    SecondPageBean.java:
    import javax.faces.event.PhaseEvent;
    import oracle.adf.view.rich.component.rich.RichPopup;
    public class SecondPageBean {
    private RichPopup popup;
    public SecondPageBean() {
    *public void phaseListener(PhaseEvent phaseEvent) {*
    *if (phaseEvent.getPhaseId().equals(phaseEvent.getPhaseId().RENDER_RESPONSE)) {*
    RichPopup.PopupHints hints = new RichPopup.PopupHints();
    popup.show(hints);
    public void setPopup(RichPopup popup) {
    this.popup = popup;
    public RichPopup getPopup() {
    return popup;
    ThirdPage.jspx:
    <af:document id="d1">
    <af:form id="f1">
    <af:outputLabel value="In Page3" id="ol1"/>
    </af:form>
    </af:document>
    Thanks,
    Navaneeth

  • Embedding swf in container on page load

    I'm trying to figure out what the AS3 script is to have a swf embedded inside of a container, little new to AS3. any help? Thanks.

    There is nothing wrong with that code unless you have some object on the stage with the instance name "sliderCont" that you are expecting to have the swf load into.  The code creates a loader instance named "sliderCont" and loads an swf into it, and then adds that loader to the display list.
    If "sliderCont" is some other object, then you need to pick a different name for your loader and then add the loader as a child of that.
    var ldr:Loader = new Loader();
    ldr.load(new URLRequest("flash-xml3.swf"));
    sliderCont.addChild(ldr);

  • Error message on page loading using SAFARI

    I need to understand this message that appears on the bottom of a page from sites loaded. I dont remember having this experience before - the message goes like this ' Loading "http....."...completed 74 of 89items' and it just stays there! or some time its more annoying when the message says competed 123 of 234 items and when the 123 number progresses to say 126 the 234 items remaining increases to a higher number, and so on until the loading page just freezes!!
    At times the page appears on screen but the message at the bottom have an additional message within brackets like (2 errors).
    Help much appreciated.
    Message was edited by: Chemat

    Hi C:
    We were all "green" at one point in time!
    Go to the menu bar when you are in the finder (not Safari). Click on "go" and then "home" (the little house). A finder window will open. Click on library. Click on preferences. In that list you will find the preference file (com.apple.safari.plist). Move that file to the trash and then restart the computer. Preference files sometimes (rare, but it happens) become corrupted. When one is missing, OS X creates one with default preferences.
    Barry

  • Calling managed bean method using ajax on jsp page loading

    Hello,
    I am using jsf1.1 i want to call managed bean method when page gets loaded using ajax.
    Thanks
    K.Ramu

    Use an ajaxical JSF framework, for example Ajax4jsf (part of RichFaces).
    But why don´t you just use the constructor of the bean class to do some stuff prior to page loading?

  • Embedded Video Plays on PCs but Not Macs

    As the King of Siam declared, "It's a puzzlement."
    I'm updating a site and have embedded a .mov from the client's YouTube channel using YouTube's preferred <iframe> code. Here is the URL: http://www.realcosmetics.com/ourStory.html.
    The video will play in all of the browsers on my Win7 PC (latest Firefox, Safari, Chrome, Opera, and IE which also emulates IE7 & IE8). It will also play on the PCs of friends I've asked to test. It will not play from the page on any Macs where we've tested. [FYI, the .mov file was edited on a Mac and plays there.]
    It will play on the Macs, however, from the YouTube channel. And the guy who is building the Facebook page embedded the same video on a tab using the old YouTube <object><embed> code. The test Macs have no problem playing the video from the FB page.
    So, I tried switching to the old <object><embed>. Still doesn't play on the Macs, so I restored the iframe code.
    What is totally confusing is that I recently embedded videos from YouTube into another site using YouTube's <iframe> code, and the client can play those on the Macs. Both pages use the same DOCTYPE (XHTML 1.0 Transitional) and code copied from YouTube. The page validates (after I removed the allowfullscreen switch which W3C said wasn't valid under the DOCTYPE).
    I've searched online through forums and discussion threads for solutions, and while I found several that seemed to work for one person but not another (having to do with changing Mac preferences, etc.), none of those solutions worked on the test Macs.
    Any ideas from you wonderful gurus? The answer may be staring me in the face but can't see it for having stared at it for so long. The only difference between this application and the previous one that I can think of is that the host servers are not the same company.
    Thanks for pondering this!
    Chris

    Adninjastrator,
    My advice was on the back of testing in Firebug - it was there I saw the .text div overlapping the Video. The video will become 'active' if I remove the float from #rcsVideo, however there are other floats and positioning that aren't helping anything.
    To clarify, I can't get the play button to change when I hover over it (and I can't click it to play it) until I disable the float on #rcsVideo. Bizarre but that's what happens - in both FF and Chrome. No idea why this works in Windows machines without disabling the float. As you can see in the images attached, .text highlights the entire video area. Then, by disabling float:left on #rcsVideo, the text area is not covering the video.
    The video itself is direct from youtube and has a flash fallback as well as many other kinds of fallback for all machines. As such, this displays in my iPad.

Maybe you are looking for