Final Cut Pro v. 10.6.6 - fcpxml file with reference to mp4 file via url works, but only after closing/reopening library
I'm writing software that exports fcpxml files to allow import of video clips into Final Cut Pro.
The file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fcpxml>
<fcpxml version="1.10">
<resources>
<asset name="ProjectName~FileName" id="r1" uid="013f2d56-c250-46b9-8b1b-3b1e2bc6ddee" start="0s" duration="3584434/1000s">
<media-rep kind="original-media" sig="013f2d56-c250-46b9-8b1b-3b1e2bc6ddee" src="myurlthatworks"></media-rep>
</asset>
<format id="r2" name="FFVideoFormat1080p30"/>
</resources>
<library location="">
<event name="FileName" uid="56b2e8bf-3369-46d1-a083-458c7da313f2">
<asset-clip ref="r1" name="mykeyword" start="15550/24s" duration="718/24s" format="r2" tcFormat="NDF" audioRole="dialogue"><keyword start="15550/24s" duration="718/24s" value="mykeyword"/></asset-clip>
<keyword-collection name="mykeyword"/>
</event>
</library>
</fcpxml>
The url in the actual file is correct.
If I create a library, create an event, then "Import Xml" to import this file, the clips and keywords show.
However, each clip has a yellow "warning" icon and each thumbnail has a "Downloading Remote Media" message, which never goes away if I just wait.
If I drag a clip to the project, the clip is there and I can play it.
If I close the library, then reopen it, all the error icons and "Downloading" thumbnail messages disappear and everything works.
The mp4 file is not that large. The background task icons show all idle. If I find the mp4 file in the Finder I can see that it has downloaded completely. I have a fast network connection.
The problem is not the url, or the clips would load after the library is closed/opened. The problem is not the file size/network because timing doesn't matter. If I instantly close/reopen the library everything works.
What am I doing wrong here?
Thanks very much in advance.