QuicktimeMovieComponent and Controller


#1

Hi Jules,
I display a QuicktimeMovieComponent on my window, It show the quictimecontroller at times but not always.

It shows.

Doesn’t show.

It’s the same piece of code. More often than not It doesn’t show the controller.

This is my code

ComponentHolder::ComponentHolder()
{
	_pQuickTimeComponent = new juce::QuickTimeMovieComponent();
	addAndMakeVisible(_pQuickTimeComponent);
	
	_pButton = new juce::TextButton(T("Load"),T("Load"));
	_pButton->addButtonListener(this);
	addAndMakeVisible(_pButton);
}

void ComponentHolder::resized()
{
	if (_pQuickTimeComponent != 0L)
		_pQuickTimeComponent->setBounds(40,40,getWidth() - 80,getHeight() - 80);
		
	if (_pButton != 0L )
		_pButton->setBounds(20,20,80,20);
}

void ComponentHolder::buttonClicked (juce::Button *button)
{
    juce::URL url(urlString);
	juce::InputStream * stream = url.createInputStream (true);
	
	if (stream != 0L && _pQuickTimeComponent != 0L)
	{
	  bool status = _pQuickTimeComponent->loadMovie (stream,true);
		while(! _pQuickTimeComponent->isMovieOpen()); // waiting for movie to load
	  _pQuickTimeComponent->play ();
	}
		
}

#2

Good old quicktime. It’s really a creaky old pile of junk under the surface.

But is this on the Mac or PC?


#3

Well this is on macintosh. I can get it to show the controller on snow leopard but haven’t been successful in showing it on leopard(haven’t tried Tiger yet).


#4

Well, if you look in juce_mac_QuickTimeComponent.cpp, you’ll see that there’s not really much that can go wrong… It passes a bool to tell the view that it wants a controller, and what happens then is anyone’s guess!


#5

You are right, there isn’t much we can do. Hopefully Apple would clean it up.


#6