×

Discussion Board

Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Registered User
    Join Date
    Oct 2005
    Posts
    107

    Re: Unable to handle error "Problem with content 1"

    Hi,

    can you post your code?

    Ramesh

  2. #17
    Regular Contributor
    Join Date
    Feb 2010
    Posts
    157

    Re: Unable to handle error "Problem with content 1"

    Hi Ramesh,

    Below is the code:

    stop();

    var s:Number=0;

    var i:Number = 0;
    var j:Number = 0;
    var k:Number = 1;
    var v:Number;

    var timeTotal:Number = 0;
    var timePlayed:Number = 0;
    var lastTimePlayed:Number = 0;
    var lastBufferLength:Number = 0;

    var path:String;
    var myNc:NetConnection;
    var myNs:NetStream;

    var type:Number = 0;
    var playHTTPFirst:Boolean = true;
    var playRMTPFirst:Boolean = true;

    var checkInterval:Number = 0;
    var clipPath:Array = new Array();

    var backlightDuration:Number = 3;

    var volumeVideo:Number = parseInt(fscommand2("GetMaxVolumeLevel"))*10;
    var volumeMute:Number = volumeVideo;
    var volumeMuteFlag:Boolean = false;

    _focusrect = false;//Supriya adds 16th March
    Selection.setFocus(player.nv1.FullS); //Supriya adds 9th March

    var lastFocusFullScreen:Boolean = false;//Supriya adds 9th March
    var seekBarLength:Number = 77.8;//Supriya adds 22nd March 2010
    var bufferTimeVideo:Number = 10;//Supriya adds 29th March 2010
    var bufferTimeIncreased:Boolean = false;

    pauseIndicator._visible = false;
    player.nv.timePlayed_txt.text = "00:00";
    player.nv.timeTotal_txt.text = "00:00";

    clipPath = ArrayvideoFileUrl;
    path = clipPath[index];

    checkFileType();

    function checkFileType()
    {
    var checkPath:String = path.substr(0,4);
    var checkFileFormat:String = path.substr((path.length - 3),3);

    if(checkPath == "http")
    {
    playHTTP();
    type=0;
    }
    else if(checkPath=="rtmp")
    {
    playRTMP();
    type=1;
    }
    else if(checkPath == 'rtsp')
    {
    player.video1.play(path);
    type=2;
    }

    player.nv1.pausebtn._visible = true;
    player.nv1.playbtn._visible = false;
    player.nv1.btnMute._visible = false;
    player.nv1.btnUnmute._visible = true;
    volumeVideo = parseInt(fscommand2("GetMaxVolumeLevel"))*10;
    snd.setVolume(volumeVideo);

    player.nv.seekpoint._y = seekBarLength;
    clearInterval(checkInterval);
    checkInterval = setInterval(getSeek, 600);
    }

    function playHTTP()
    {
    if(playHTTPFirst == true)
    {
    myNc = new NetConnection;
    myNc.connect(null);
    myNs = new NetStream(myNc);
    player.video1.attachVideo(myNs);
    myNs.setBufferTime(bufferTimeVideo);
    playHTTPFirst = false;
    }
    myNs.play(path);
    }

    function playRTMP()
    {
    var rtmpPath:String = path.substr(0,30)
    var fileName = stringReplace(path,rtmpPath, "");
    if(playRMTPFirst == true)
    {
    myNc = new NetConnection;
    myNc.connect(rtmpPath);
    myNs = new NetStream(myNc);
    player.video1.attachVideo(myNs);
    myNs.setBufferTime(bufferTimeVideo);
    playRMTPFirst = false;
    }
    myNs.play(fileName+"_150");
    }

    this.createEmptyMovieClip("vidSound",this.getNextHighestDepth);
    vidSound.attachAudio(myNs);
    var snd:Sound = new Sound(vidSound);
    snd.setVolume(volumeVideo);

    myNs.onMetaData=function(info)
    {
    timeTotal = Math.round(info.duration);
    player.nv.timeTotal_txt.text = makeTime(timeTotal);
    }

    //checkInterval the connection status and report if the video was not found//
    myNs.onStatus = function(info)
    {
    stats._visible = true;
    switch(info.code)
    {
    case "NetStream.Play.StreamNotFound":
    stats.text="Sorry! Couldn't find it.";
    videoLoader._visible = false;
    break;

    case "NetConnection.Connect.Failed":
    stats.text="Oops! My way is blocked.";
    videoLoader._visible = false;
    break;

    case "NetStream.Play.Start":
    videoLoader._visible = true;
    break;

    case "NetStream.Buffer.Empty":
    videoLoader._visible = true;
    break;

    case "NetStream.Buffer.Full":
    stats.text = "";
    videoLoader._visible = false;
    break;

    case "NetStream.Play.Stop":// on video stop
    videoLoader._visible = false;
    myNs.close();
    myNc.close();
    delete path;//Supriya adds to increase memory
    delete myNs;//Supriya adds to increase memory
    delete myNc;//Supriya adds to increase memory
    clearInterval(checkInterval);
    break;
    }
    }

    var keyListener:Object=new Object();
    Key.addListener(keyListener);

    function getSeek()
    {
    //do not show loading or status message while pause
    if(player.nv1.pausebtn._visible == false)
    {
    stats.text = "";
    videoLoader._visible = false;
    }
    //do not show loading or status message while pause
    else
    {
    if (lastTimePlayed == myNs.time) //show loading while buffering

    {
    videoLoader._visible = true;
    }
    else
    {
    stats.text = "";
    videoLoader._visible = false;
    }
    }

    if(timeTotal > 0 && myNs.time <= timeTotal)
    {
    timePlayed = Math.round(myNs.time);
    lastTimePlayed = myNs.time;
    lastBufferLength = myNs.bufferLength;
    player.nv.timePlayed_txt.text = makeTime(timePlayed);
    player.nv.seekpoint._y = seekBarLength - Math.round(timePlayed * 182 / timeTotal);
    }
    if((lastFocusFullScreen == true) && (player._currentframe == 1))
    {
    Selection.setFocus(player.nv1.FullS);
    lastFocusFullScreen = false;
    }
    }

    //back to video details page//
    player.nv.back.onRelease = function()
    {
    myNs.close();
    myNc.close();
    delete path;
    delete myNs;
    delete myNc;
    player.nv.seekpoint._y = seekBarLength;
    clearInterval(checkInterval);
    }

    player.nv1.prvbtn.onRelease = function()
    {
    if (index > 0)
    {
    clearInterval(checkInterval);

    if(type == 0)
    {
    player.video1.clear();
    myNs.pause();
    myNc.close();
    myNs.close();
    }
    else
    {
    player.video1.clear();
    player.video1.stop();
    player.video1.close();
    }
    pauseIndicator._visible = false;
    player.nv1.pausebtn._visible = true;
    player.nv1.playbtn._visible = false;
    timeTotal = 0;
    timePlayed = 0;
    player.nv.timePlayed_txt.text = "00:00";
    player.nv.timeTotal_txt.text = "00:00";

    index--;
    path = clipPath[index];
    checkFileType();
    }
    }

    //navigation//
    player.nv1.pausebtn.onRelease = function()
    {
    if(type == 0)
    {
    myNs.pause(true);//pauses the play//
    }
    else
    {
    player.video1.pause();
    }

    stats.text = "";
    videoLoader._visible = false;
    player.nv1.pausebtn._visible = false;
    player.nv1.playbtn._visible = true;
    pauseIndicator._visible = true;
    Selection.setFocus(player.nv1.playbtn);
    }

    player.nv1.playbtn.onRelease = function()
    {
    if(type == 0)
    {
    myNs.pause(false)//resume the play
    }
    else
    {
    player.video1.resume();
    }

    player.nv1.pausebtn._visible = true;
    player.nv1.playbtn._visible = false;
    pauseIndicator._visible = false;
    Selection.setFocus(player.nv1.pausebtn);
    }

    player.nv1.nxtbtn.onRelease = function()
    {
    if (index < (clipPath.length - 1) && clipPath[index + 1] != undefined)
    {
    clearInterval(checkInterval);

    if(type == 0)
    {
    player.video1.clear();
    myNs.pause();
    myNc.close();
    myNs.close();
    }
    else
    {
    player.video1.clear();
    player.video1.stop();
    player.video1.close();
    }

    pauseIndicator._visible = false;
    player.nv1.pausebtn._visible = true;
    player.nv1.playbtn._visible = false;
    timePlayed_txt.text = "00:00";
    timeTotal_txt.text = "00:00";
    timeTotal = 0;
    timePlayed = 0;
    player.nv.timePlayed_txt.text = "00:00";
    player.nv.timeTotal_txt.text = "00:00";

    index++;
    path = clipPath[index];
    checkFileType();
    }
    }

    player.nv1.btnUnmute.onRelease = function()
    {
    if(volumeMuteFlag == false)//current is unmute
    {
    volumeMuteFlag = true;
    snd.setVolume(0);
    player.nv1.btnMute._visible = true;
    player.nv1.btnUnmute._visible = false;
    Selection.setFocus(player.nv1.btnMute);
    }
    }

    player.nv1.btnMute.onRelease = function()
    {
    if(volumeMuteFlag == true)//current is mute
    {
    volumeMuteFlag = false;
    if(volumeVideo <= 10)
    {
    volumeVideo = 10;
    }
    snd.setVolume(volumeVideo);
    player.nv1.btnMute._visible = false;
    player.nv1.btnUnmute._visible = true;
    Selection.setFocus(player.nv1.btnUnmute);
    }
    }


    function makeTime(Time:Number):String
    {
    if(isNaN(Time))
    {
    Time = 0;
    }

    var min = Math.floor(Time/60);
    var sec = Math.floor(Time-min*60)
    sec = prefixZero(String(sec));
    min = prefixZero(String(min));
    return min +':' + sec;
    }

    function prefixZero(valueString:String):String
    {
    if(valueString.length==1)
    {
    return '0'+ valueString;
    }
    else
    {
    return valueString;
    }
    }



    Regards,
    Supriya Tenany
    Last edited by supriyaakg; 2010-05-05 at 10:14.

  3. #18
    Registered User
    Join Date
    Oct 2005
    Posts
    107

    Re: Unable to handle error "Problem with content 1"

    Hi,

    Instead of this

    if (type == 0) {
    player.video1.clear();
    myNs.pause();
    myNc.close();
    myNs.close();
    } else {
    player.video1.clear();
    player.video1.stop();
    player.video1.close();
    }

    Do this wherever its used...

    if (type == 0) {
    player.video1.clear();
    myNs.pause();
    myNc.close();
    myNs.close();
    } else {
    player.video1.clear();
    }

    Hope it works!

    Ramesh

  4. #19
    Regular Contributor
    Join Date
    Feb 2010
    Posts
    157

    Re: Unable to handle error "Problem with content 1"

    Hi Ramesh,

    That doesnt work either. I have sent you the code that you had mailed me with these changes.

    Regards,
    Supriya Tenany

Similar Threads

  1. how do we handle multiple language releases
    By dazza66667 in forum [Closed] Publishing to Nokia Store
    Replies: 11
    Last Post: 2009-08-10, 16:49
  2. Content file is pending unpublishing
    By andynugent in forum [Closed] Publishing to Nokia Store
    Replies: 2
    Last Post: 2009-05-28, 16:50
  3. Ovi Testing
    By grahamhughes in forum [Closed] Publishing to Nokia Store
    Replies: 8
    Last Post: 2009-05-09, 15:41
  4. O2 Service Provider Problem--- Unable to download content
    By Viveksonu in forum General Development Questions
    Replies: 2
    Last Post: 2007-08-28, 12:00
  5. Unable to handle the downloaded file
    By S.S.Sudhakar in forum Symbian
    Replies: 0
    Last Post: 2004-12-30, 11:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×